@alwith/module-chat 0.6.29 → 0.6.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/client.js +1 -1
- package/dist/agent/custom-model-effort.js +1 -1
- package/dist/agent/fork-title.js +1 -1
- package/dist/agent/image-tools.js +1 -1
- package/dist/agent/input-config.js +1 -1
- package/dist/agent/request-error.js +1 -1
- package/dist/app-reference.js +1 -1
- package/dist/application-tools.js +1 -1
- package/dist/approval/choice-elicitation-form.js +1 -1
- package/dist/approval/choice-schema.js +1 -1
- package/dist/approval/permission-view.js +1 -1
- package/dist/{chunk-717437bm.js → chunk-0c0txenw.js} +1 -1
- package/dist/{chunk-1dpk9zrb.js → chunk-0ga1y5v1.js} +1 -1
- package/dist/{chunk-wxjm3mq8.js → chunk-0mc30tx9.js} +1 -1
- package/dist/{chunk-y780cd4m.js → chunk-0pmacxae.js} +1 -1
- package/dist/{chunk-6r1e3y4e.js → chunk-0pxeark7.js} +1 -1
- package/dist/{chunk-aq22zye1.js → chunk-138xvdrk.js} +1 -1
- package/dist/{chunk-2c4hqv8f.js → chunk-18gxawh7.js} +2 -2
- package/dist/{chunk-dwf38vyq.js → chunk-1jsjn8ga.js} +1 -1
- package/dist/{chunk-m76tgtge.js → chunk-1vf301b7.js} +2 -2
- package/dist/{chunk-6g5qmjph.js → chunk-1xrdp5kw.js} +2 -2
- package/dist/{chunk-r51vcbf0.js → chunk-29wxdp28.js} +2 -2
- package/dist/{chunk-cttsbjr0.js → chunk-2d8msv4h.js} +1 -1
- package/dist/{chunk-12pd4nxy.js → chunk-2dq1epq4.js} +2 -2
- package/dist/{chunk-zcfsbgvw.js → chunk-2f5cbah7.js} +2 -2
- package/dist/{chunk-7jk8s061.js → chunk-2sc2z6g5.js} +2 -2
- package/dist/{chunk-dfzhma2x.js → chunk-38geb5gj.js} +2 -2
- package/dist/{chunk-5arfhz6m.js → chunk-3942tdd5.js} +1 -1
- package/dist/{chunk-6eebeq0f.js → chunk-3qwmf9qd.js} +2 -2
- package/dist/{chunk-cp3qcgdv.js → chunk-4115mzgp.js} +2 -2
- package/dist/{chunk-4y07ykv2.js → chunk-413sz7fx.js} +2 -2
- package/dist/{chunk-fednb216.js → chunk-4d2khkms.js} +1 -1
- package/dist/{chunk-tdaznr5w.js → chunk-4mca4p7m.js} +1 -1
- package/dist/{chunk-v6f6s828.js → chunk-4p1z0b21.js} +1 -1
- package/dist/{chunk-ehcnfvaz.js → chunk-4p3ekttc.js} +1 -1
- package/dist/{chunk-188q5xn8.js → chunk-4w0x1hdt.js} +2 -2
- package/dist/{chunk-12bfnfbk.js → chunk-5dtpfpq5.js} +2 -2
- package/dist/{chunk-gjj5wbms.js → chunk-5fcp7haj.js} +2 -2
- package/dist/{chunk-v0xy25sh.js → chunk-5g32hx9d.js} +2 -2
- package/dist/{chunk-hc9bcwpa.js → chunk-5ny4ped8.js} +2 -2
- package/dist/{chunk-4npg9v6h.js → chunk-6xzf444w.js} +2 -2
- package/dist/{chunk-qdbyn3xv.js → chunk-70ks1y6v.js} +2 -2
- package/dist/{chunk-dxfhy8gr.js → chunk-7393tva2.js} +2 -2
- package/dist/{chunk-xmy7ebed.js → chunk-7dy4z3r8.js} +2 -2
- package/dist/{chunk-kq8jv5tf.js → chunk-8477q09c.js} +1 -1
- package/dist/{chunk-dbrrbwb8.js → chunk-8f8dma9e.js} +1 -1
- package/dist/{chunk-k0rfgjm6.js → chunk-8zy4az1y.js} +1 -1
- package/dist/{chunk-9xdne4k4.js → chunk-9cfmet6r.js} +2 -2
- package/dist/{chunk-q98s7d94.js → chunk-9sag90th.js} +1 -1
- package/dist/{chunk-fvw65b49.js → chunk-a6vp2dmt.js} +2 -2
- package/dist/{chunk-jbnbx285.js → chunk-a74zcp1j.js} +2 -2
- package/dist/{chunk-agz11n1h.js → chunk-afypqn52.js} +2 -2
- package/dist/{chunk-efkfzgs9.js → chunk-avq6x733.js} +1 -1
- package/dist/{chunk-fvf1et2s.js → chunk-axz2rr58.js} +1 -1
- package/dist/{chunk-vvy4ke91.js → chunk-b0p2j2ab.js} +1 -1
- package/dist/{chunk-bnf6pmgc.js → chunk-batckcj8.js} +1 -1
- package/dist/chunk-bbfzm39y.js +2 -0
- package/dist/{chunk-6gejqbns.js → chunk-bj3sacn1.js} +1 -1
- package/dist/{chunk-y5xjf5sb.js → chunk-bmeych5s.js} +1 -1
- package/dist/{chunk-kzh7w9c0.js → chunk-cz31f4gr.js} +2 -2
- package/dist/{chunk-kk5acm1s.js → chunk-dakt7k9q.js} +2 -2
- package/dist/{chunk-7ckdhz5y.js → chunk-dhda1jhs.js} +2 -2
- package/dist/{chunk-yc7w1en3.js → chunk-djppmswk.js} +2 -2
- package/dist/{chunk-sb2694hc.js → chunk-drs741zm.js} +1 -1
- package/dist/{chunk-d8bjsf1d.js → chunk-e0t3cpx3.js} +1 -1
- package/dist/{chunk-52hvpdxw.js → chunk-edqxxx93.js} +1 -1
- package/dist/chunk-eg00mvca.js +2 -0
- package/dist/{chunk-n9e1v175.js → chunk-et01n220.js} +1 -1
- package/dist/{chunk-sx1gjwb6.js → chunk-f0gq9f1f.js} +1 -1
- package/dist/{chunk-wxafew32.js → chunk-ftsqd7n5.js} +2 -2
- package/dist/{chunk-j1khvg9s.js → chunk-g23ktesb.js} +1 -1
- package/dist/{chunk-06aaghwq.js → chunk-gtyrc6cd.js} +2 -2
- package/dist/{chunk-0c956xc0.js → chunk-gvqvw7ms.js} +2 -2
- package/dist/chunk-hfh3yen9.js +5 -0
- package/dist/{chunk-bbvhgh27.js → chunk-hm7f1vsx.js} +1 -1
- package/dist/{chunk-wfk50eh6.js → chunk-hmtsavm4.js} +1 -1
- package/dist/{chunk-qd8j2d63.js → chunk-j1kf4cj2.js} +1 -1
- package/dist/{chunk-sykf5jnc.js → chunk-jtcccqpp.js} +2 -2
- package/dist/{chunk-nravn5bk.js → chunk-jtnjd3ec.js} +2 -2
- package/dist/chunk-jv1db7gt.js +4 -0
- package/dist/{chunk-vjgze5n7.js → chunk-jx0djwvd.js} +2 -2
- package/dist/{chunk-vvmmzcms.js → chunk-jytat3j5.js} +2 -2
- package/dist/{chunk-m7t9asrq.js → chunk-kcgc9915.js} +2 -2
- package/dist/{chunk-nq2tqdb2.js → chunk-m0skv5q0.js} +2 -2
- package/dist/{chunk-w7vcd8d1.js → chunk-m395aw24.js} +2 -2
- package/dist/{chunk-gdn4vvks.js → chunk-m3a6paxj.js} +2 -2
- package/dist/{chunk-zewseva6.js → chunk-m9rbb04n.js} +2 -2
- package/dist/{chunk-ynp45k84.js → chunk-mjfc1dyv.js} +1 -1
- package/dist/{chunk-tbz64dbd.js → chunk-mnz33drf.js} +3 -3
- package/dist/{chunk-qc49fm8e.js → chunk-mzqfa37p.js} +1 -1
- package/dist/{chunk-ds6bqmdr.js → chunk-nfkfgz2s.js} +1 -1
- package/dist/{chunk-36rxa8k7.js → chunk-npkbsc1k.js} +1 -1
- package/dist/{chunk-5n2304a1.js → chunk-p474fn4q.js} +2 -2
- package/dist/{chunk-sdhkpkbs.js → chunk-paxthe5v.js} +1 -1
- package/dist/{chunk-xpj8gb9a.js → chunk-pxv16edc.js} +1 -1
- package/dist/{chunk-n7f38k3f.js → chunk-pyx2n7yx.js} +2 -2
- package/dist/{chunk-epdnafa1.js → chunk-qbxdgkk9.js} +2 -2
- package/dist/{chunk-x9rppnkq.js → chunk-qt16accq.js} +1 -1
- package/dist/chunk-r7n16m8h.js +2 -0
- package/dist/{chunk-ahzjy61p.js → chunk-rkejggyx.js} +2 -2
- package/dist/{chunk-6yzknjee.js → chunk-rtjf5haf.js} +1 -1
- package/dist/{chunk-3cwbxnxr.js → chunk-s0mrsrb0.js} +1 -1
- package/dist/{chunk-6wkcqhkk.js → chunk-sjqhtpzr.js} +2 -2
- package/dist/{chunk-xca0vnvk.js → chunk-swmxz9q0.js} +2 -2
- package/dist/{chunk-3kxerrsh.js → chunk-t9ktp4sf.js} +2 -2
- package/dist/{chunk-rhyw89ap.js → chunk-tdw7k1df.js} +1 -1
- package/dist/{chunk-8p861ztc.js → chunk-tnmghaap.js} +2 -2
- package/dist/chunk-v5m2qx8b.js +4 -0
- package/dist/{chunk-xqsfaaae.js → chunk-vchbk4h5.js} +2 -2
- package/dist/{chunk-ybwevt5n.js → chunk-vw6546pp.js} +2 -2
- package/dist/{chunk-w5rg8wk8.js → chunk-vzm88w2r.js} +2 -2
- package/dist/{chunk-yn3d949k.js → chunk-wdxxr1xk.js} +1 -1
- package/dist/chunk-wwywmqh8.js +2 -0
- package/dist/{chunk-2rk59ngw.js → chunk-wy4rtebz.js} +1 -1
- package/dist/{chunk-37x36kph.js → chunk-xq4xeksc.js} +3 -3
- package/dist/{chunk-qz9q0g2b.js → chunk-yvmjh230.js} +1 -1
- package/dist/{chunk-7sf2wz1n.js → chunk-ywax4zad.js} +2 -2
- package/dist/{chunk-yqhvxm9m.js → chunk-zd1fk347.js} +1 -1
- package/dist/client.js +1 -1
- package/dist/codex/activity-group.js +1 -1
- package/dist/codex/artifact-links.js +1 -1
- package/dist/codex/assistant-message.js +1 -1
- package/dist/codex/async-question-card.js +1 -1
- package/dist/codex/image-view-activity.js +1 -1
- package/dist/codex/markdown-renderer.js +1 -1
- package/dist/collections/collection-emoji.js +1 -1
- package/dist/collections/collection-menu.js +1 -1
- package/dist/collections/collection-panel.js +1 -1
- package/dist/collections/collections.js +1 -1
- package/dist/collections/host.js +1 -1
- package/dist/collections/model.js +1 -1
- package/dist/collections/store.js +1 -1
- package/dist/composer/completion-menu.js +1 -1
- package/dist/composer/inline-document.js +1 -1
- package/dist/composer/inline-dom.js +1 -1
- package/dist/composer/prompt-input-clipboard.js +1 -1
- package/dist/composer/prompt-input-inline.js +1 -1
- package/dist/composer/prompt-input-textarea.js +1 -1
- package/dist/conversation/action-card.js +1 -1
- package/dist/conversation/composer/apps-menu.js +1 -1
- package/dist/conversation/composer/composer-menu.js +1 -1
- package/dist/conversation/composer/composer.js +1 -1
- package/dist/conversation/composer/context.js +1 -1
- package/dist/conversation/composer/drafts.js +1 -1
- package/dist/conversation/composer/file-items.js +1 -1
- package/dist/conversation/composer/long-text.js +1 -1
- package/dist/conversation/composer/mention-chips.js +1 -1
- package/dist/conversation/composer/mention-uri.js +1 -1
- package/dist/conversation/composer/model-menu.js +1 -1
- package/dist/conversation/composer/pasted-text-attachment.js +1 -1
- package/dist/conversation/composer/permission-mode-menu.js +1 -1
- package/dist/conversation/composer/prediction.js +1 -1
- package/dist/conversation/composer/slash-command-button.js +1 -1
- package/dist/conversation/composer/submit-button.js +1 -1
- package/dist/conversation/composer/usage-meter.js +1 -1
- package/dist/conversation/connection-notice.js +1 -1
- package/dist/conversation/context.js +1 -1
- package/dist/conversation/conversation-body.js +1 -1
- package/dist/conversation/conversation-search.js +1 -1
- package/dist/conversation/conversation-view.js +1 -1
- package/dist/conversation/conversation.js +1 -1
- package/dist/conversation/diff-modal.js +1 -1
- package/dist/conversation/draft-project-picker.js +1 -1
- package/dist/conversation/session-actions.js +1 -1
- package/dist/conversation/subagent-sessions.js +1 -1
- package/dist/conversation/subagent-tasks.js +1 -1
- package/dist/desktop/desktop-composer.js +1 -1
- package/dist/desktop/desktop.js +1 -1
- package/dist/desktop/draft-model-select.js +1 -1
- package/dist/desktop/model-catalog.js +1 -1
- package/dist/desktop/model-recovery.js +1 -1
- package/dist/desktop/model-settings-action.js +1 -1
- package/dist/desktop/native-file-drop.js +1 -1
- package/dist/lib/chat-path.js +1 -1
- package/dist/lib/group-blocks.js +1 -1
- package/dist/lib/markdown-parser.worker.js +58 -55
- package/dist/lib/model-name.js +1 -1
- package/dist/lib/stream-style.js +1 -1
- package/dist/mermaid/diagram.js +1 -1
- package/dist/mermaid/index.js +1 -1
- package/dist/plugins/plugin-detail-page.js +1 -1
- package/dist/plugins/plugins-page.js +1 -1
- package/dist/plugins/plugins.js +1 -1
- package/dist/plugins/skill-document.js +1 -1
- package/dist/plugins/skills-tab.js +1 -1
- package/dist/reference-projection.js +1 -1
- package/dist/search/chat-search.js +1 -1
- package/dist/search/codex-source-matches.js +1 -1
- package/dist/search/dom-matches.js +1 -1
- package/dist/search/literal-matches.js +1 -1
- package/dist/session-list/account-menu.js +1 -1
- package/dist/session-list/activity-list.js +1 -1
- package/dist/session-list/hover-info-card.js +1 -1
- package/dist/session-list/navigation-controls.js +1 -1
- package/dist/session-list/navigation-header.js +1 -1
- package/dist/session-list/navigation.js +1 -1
- package/dist/session-list/session-info-card.js +1 -1
- package/dist/session-list/session-list.js +1 -1
- package/dist/session-list/session-row.js +1 -1
- package/dist/session-list/shortcut-hint.js +1 -1
- package/dist/session-list/use-activity-preview.js +1 -1
- package/dist/session-timeline/activity-group.js +1 -1
- package/dist/session-timeline/activity-projection.js +1 -1
- package/dist/session-timeline/assistant-content.js +1 -1
- package/dist/session-timeline/assistant-image-references.js +1 -1
- package/dist/session-timeline/assistant-turn.js +1 -1
- package/dist/session-timeline/async-questions.js +1 -1
- package/dist/session-timeline/edited-files-card.js +1 -1
- package/dist/session-timeline/host.js +1 -1
- package/dist/session-timeline/image-generation-progress.js +1 -1
- package/dist/session-timeline/navigation-rail.js +1 -1
- package/dist/session-timeline/resource-content.js +1 -1
- package/dist/session-timeline/session-timeline.js +1 -1
- package/dist/session-timeline/turn-error.js +1 -1
- package/dist/session-timeline/turns.js +1 -1
- package/dist/session-timeline/user-message.js +1 -1
- package/dist/settings/codex-account-card.js +1 -1
- package/dist/settings/login-card.js +1 -1
- package/dist/settings/model-alias-settings.js +1 -1
- package/dist/settings/model-aliases.js +1 -1
- package/dist/settings/provider-logos.js +1 -1
- package/dist/settings/provider-section.js +1 -1
- package/dist/settings/providers-port.js +1 -1
- package/dist/settings/providers.js +1 -1
- package/dist/settings/settings.js +1 -1
- package/package.json +4 -4
- package/dist/chunk-3gkb117f.js +0 -4
- package/dist/chunk-4fghmx57.js +0 -2
- package/dist/chunk-621g2ntr.js +0 -4
- package/dist/chunk-azak3tb5.js +0 -2
- package/dist/chunk-ge0anaww.js +0 -4
- package/dist/chunk-htsbt68m.js +0 -2
- package/dist/chunk-xk41ehy8.js +0 -2
package/dist/agent/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b,lr}from"../chunk-
|
|
1
|
+
import{b,lr}from"../chunk-edqxxx93.js";import"../chunk-swmxz9q0.js";import"../chunk-sjqhtpzr.js";import"../chunk-t9ktp4sf.js";import"../chunk-yvmjh230.js";import"../chunk-me230xjh.js";import"../chunk-ts7h148j.js";import"../chunk-hqfhb4ng.js";import"../chunk-pv7t4hw8.js";import"../chunk-afnnrn6z.js";import"../chunk-5dygcexv.js";import"../chunk-qt16accq.js";import"../chunk-b4qe4xnp.js";import"../chunk-413sz7fx.js";import"../chunk-46j8adkj.js";import"../chunk-h1t76wws.js";export{lr as CodexClient,b as NATIVE_MODEL_GROUP};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{wo}from"../chunk-
|
|
1
|
+
import{wo}from"../chunk-qt16accq.js";export{wo as customModelEffort};
|
package/dist/agent/fork-title.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{On}from"../chunk-sjqhtpzr.js";export{On as forkTitle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dr}from"../chunk-
|
|
1
|
+
import{dr}from"../chunk-yvmjh230.js";import"../chunk-me230xjh.js";import"../chunk-413sz7fx.js";import"../chunk-46j8adkj.js";import"../chunk-h1t76wws.js";export{dr as createImageTool};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cr,
|
|
1
|
+
import{cr,Hn}from"../chunk-t9ktp4sf.js";export{cr as parseInputConfig,Hn as parseInputSnapshot};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ee,
|
|
1
|
+
import{ee,Fn,oa}from"../chunk-swmxz9q0.js";export{oa as explainRequestError,ee as isAuthenticationRequired,Fn as isModelSelectionRequired};
|
package/dist/app-reference.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{xe}from"./chunk-
|
|
1
|
+
import{xe}from"./chunk-b0p2j2ab.js";import"./chunk-vw6546pp.js";import"./chunk-3btheq4v.js";export{xe as AppReferenceBadge};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Bn,ko,So}from"./chunk-413sz7fx.js";export{ko as APPLICATION_SERVER_NAME,So as ApplicationToolRegistry,Bn as defineApplicationTool};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{rr,mo,Ye,
|
|
1
|
+
import{rr,mo,Ye,En}from"../chunk-2f5cbah7.js";import{autoUpdate as j}from"@floating-ui/dom";import{cn as A}from"cn";import{useCallback as T,useEffect as I,useLayoutEffect as L,useMemo as q,useRef as G,useState as C}from"react";import{createPortal as V}from"react-dom";import{Badge as W}from"@nyssance/shadcn/vega/components/ui/badge";import{Button as B}from"@nyssance/shadcn/vega/components/ui/button";import{Checkbox as H}from"@nyssance/shadcn/vega/components/ui/checkbox";import{Input as M}from"@nyssance/shadcn/vega/components/ui/input";import{Label as O}from"@nyssance/shadcn/vega/components/ui/label";import{RadioGroup as K,RadioGroupItem as _}from"@nyssance/shadcn/vega/components/ui/radio-group";import{Textarea as X}from"@nyssance/shadcn/vega/components/ui/textarea";import{jsx as s,jsxs as d}from"react/jsx-runtime";var l="__other__";function de({current:n,total:U,anchorRef:x,t:u,onAccept:P,onDecline:Q}){let p=q(()=>n?rr(n.requestedSchema):[],[n]),[b,g]=C({}),S=G(null);I(()=>{if(n?.elicitationId===void 0)return;let e={};for(let{key:r,property:i}of p)if(!Ye(i)){let c=En(i)[0];if(c)e[r]={selected:c.value}}g(e)},[n?.elicitationId,p]),I(()=>{if(n?.elicitationId!==void 0&&S.current&&document.activeElement?.tagName!=="INPUT"&&document.activeElement?.tagName!=="TEXTAREA")S.current.focus()},[n?.elicitationId]);let[w,R]=C(null),[k,z]=C(null),N=T(()=>{let e=x.current;if(!e)return;let r=e.getBoundingClientRect();if(r.width===0){let i=Math.min(640,window.innerWidth*0.9);R({left:(window.innerWidth-i)/2,width:i,bottom:24});return}R({left:r.left,width:r.width,bottom:window.innerHeight-r.bottom+20})},[x]);L(()=>{if(!n)return;let e=0,r=()=>{if(x.current){N();return}e=requestAnimationFrame(r)};return r(),()=>cancelAnimationFrame(e)},[n,N,x]),L(()=>{let e=x.current;if(!n||!e||!k)return;return j(e,k,N,{animationFrame:!0})},[n,k,x,N]);let y=q(()=>{if(!n)return!1;for(let{key:e,property:r}of p){let i=b[e];if(!i)return!1;if(Ye(r)){if(!i.selectedSet||i.selectedSet.size===0)return!1;if(i.selectedSet.has(l)&&!i.otherText?.trim())return!1}else{if(!i.selected)return!1;if(i.selected===l&&!i.otherText?.trim())return!1}}return!0},[n,p,b]),D=T(async()=>{if(!n)return;if(!y)return;let e={},r={};for(let{key:i,property:c}of p){let a=b[i];if(!a)continue;let f;if(Ye(c))e[i]=[...a.selectedSet??[]].map((m)=>m===l?(a.otherText??"").trim():m).filter(Boolean);else{let m=a.selected??"";if(e[i]=m===l?(a.otherText??"").trim():m,m!==l)f=En(c).find((t)=>t.value===m)?.preview}let v=a.notes?.trim();if(f||v)r[i]={...f&&{preview:f},...v&&{notes:v}}}await P(n.elicitationId,e,r)},[n,p,b,y,P]),F=T(async()=>{if(n)await Q(n.elicitationId)},[n,Q]);if(!n||!w)return null;return V(d("div",{"data-overlay":"ask-user-question",tabIndex:0,onKeyDown:(e)=>{if(e.key==="Escape")e.preventDefault(),F()},className:"bg-card border-border fixed z-50 flex flex-col overflow-hidden rounded-lg border shadow-lg outline-none",style:{left:w.left,width:w.width,bottom:w.bottom,maxHeight:"70vh"},ref:(e)=>{S.current=e,z(e)},children:[d("div",{className:"border-border flex shrink-0 items-center justify-between gap-2 border-b px-3 py-2",children:[s("div",{className:"text-foreground text-sm font-medium",children:u("askUserQuestion.title")}),U>1&&s("span",{className:"text-muted-foreground shrink-0 text-xs",children:`1 / ${U}`})]}),s("div",{className:"min-h-0 flex-1 overflow-y-auto",children:s("div",{className:"space-y-4 px-3 py-3",children:p.map(({key:e,property:r},i)=>{let c=b[e],a=c?.selected,f=c?.selectedSet??new Set,v=En(r),m=Ye(r);return d("div",{className:"space-y-2",children:[d("div",{className:"flex items-center gap-2",children:[s(W,{variant:"secondary",className:"font-mono text-[10px] tracking-wide uppercase",children:mo(r).title??e}),s("div",{className:"text-foreground text-sm font-medium",children:mo(r).description})]}),m?d("div",{className:"space-y-1.5 ps-1",children:[v.map((t)=>d("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[s(H,{checked:f.has(t.value),onCheckedChange:(o)=>{g((h)=>{let E=new Set(h[e]?.selectedSet??new Set);if(o)E.add(t.value);else E.delete(t.value);return{...h,[e]:{...h[e],selectedSet:E}}})}}),d("div",{className:"min-w-0 flex-1",children:[s("div",{className:"text-foreground text-sm",children:t.label}),t.description&&s("div",{className:"text-muted-foreground text-xs",children:t.description})]})]},t.value)),d("label",{className:"hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",children:[s(H,{checked:f.has(l),onCheckedChange:(t)=>{g((o)=>{let h=new Set(o[e]?.selectedSet??new Set);if(t)h.add(l);else h.delete(l);return{...o,[e]:{...o[e],selectedSet:h}}})}}),s("div",{className:"text-foreground min-w-0 flex-1 text-sm",children:u("askUserQuestion.other")})]}),f.has(l)&&s("div",{className:"ps-7",children:s(M,{placeholder:u("askUserQuestion.otherPlaceholder"),value:c?.otherText??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],otherText:t.target.value}}))})})]}):d(K,{value:a??"",onValueChange:(t)=>g((o)=>({...o,[e]:{...o[e],selected:t}})),className:"space-y-1.5 ps-1",children:[v.map((t)=>{let o=`${i}:${t.value}`;return d("div",{className:A("hover:bg-muted/40 flex cursor-pointer items-center gap-2 rounded-sm px-1.5 py-1",a===t.value&&"bg-muted/60"),children:[s(_,{value:t.value,id:o}),d(O,{htmlFor:o,className:"min-w-0 flex-1 cursor-pointer",children:[s("div",{className:"text-foreground text-sm font-normal",children:t.label}),t.description&&s("div",{className:"text-muted-foreground text-xs font-normal",children:t.description})]})]},t.value)}),d("div",{className:A("hover:bg-muted/40 flex items-center gap-2 rounded-sm px-1.5 py-1",a===l&&"bg-muted/60"),children:[s(_,{value:l,id:`${i}:other`,className:"mt-0.5"}),s(O,{htmlFor:`${i}:other`,className:"text-foreground min-w-0 flex-1 cursor-pointer text-sm font-normal",children:u("askUserQuestion.other")})]}),a===l&&s("div",{className:"ps-7",children:s(M,{placeholder:u("askUserQuestion.otherPlaceholder"),value:c?.otherText??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],otherText:t.target.value}}))})})]}),!m&&a&&a!==l&&(()=>{let t=v.find((o)=>o.value===a)?.preview;if(!t)return null;return s("pre",{className:"bg-muted/50 text-muted-foreground ms-1 mt-1 overflow-auto rounded-sm px-2 py-1.5 font-mono text-[11px] whitespace-pre-wrap",children:t})})(),v.some((t)=>t.preview)&&s(X,{placeholder:u("askUserQuestion.notesPlaceholder"),value:c?.notes??"",onChange:(t)=>g((o)=>({...o,[e]:{...o[e],notes:t.target.value}})),rows:1,className:"min-h-0 resize-none text-xs"})]},e)})})}),d("div",{className:"border-border bg-card flex shrink-0 items-center justify-end gap-2 border-t px-3 py-2",children:[s(B,{variant:"ghost",size:"sm",onClick:()=>void F(),children:u("askUserQuestion.cancel")}),s(B,{size:"sm",disabled:!y,onClick:()=>void D(),children:u("askUserQuestion.submit")})]})]}),document.body)}export{de as ChoiceElicitationForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{rr,mo,Ye,
|
|
1
|
+
import{rr,mo,Ye,En}from"../chunk-2f5cbah7.js";export{rr as elicitationFields,mo as elicitationLabels,En as elicitationOptions,Ye as isMultiSelect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Wi}from"../chunk-
|
|
1
|
+
import{Wi}from"../chunk-bbfzm39y.js";import"../chunk-n7pyzjq1.js";export{Wi as PermissionView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j}from"./chunk-
|
|
1
|
+
import{j}from"./chunk-gvqvw7ms.js";import{He}from"./chunk-gtyrc6cd.js";import{M,me}from"./chunk-m3a6paxj.js";import{B,ie}from"./chunk-djppmswk.js";import{Ie,pe}from"./chunk-4d2khkms.js";import{cn as G}from"cn";import{BoxIcon as S,ChevronRightIcon as U,PlusIcon as E,StarIcon as u}from"lucide-react";import{useState as d}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{DropdownMenu as z,DropdownMenuContent as L,DropdownMenuGroup as y,DropdownMenuItem as k,DropdownMenuRadioGroup as _,DropdownMenuRadioItem as K,DropdownMenuSeparator as q,DropdownMenuTrigger as J}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{Input as Q}from"@nyssance/shadcn/vega/components/ui/input";import{jsx as e,jsxs as a}from"react/jsx-runtime";function Ei({sessionId:l,trigger:f,favorite:n=!1,hoverBackground:O=n?"none":void 0,allowRemove:R=!0,submenu:g=!1,className:x,onOpenChange:A}){let{t}=M(),c=pe(),T=me(),H=He(),{collections:s,order:C}=Ie(),i=C.find((o)=>s[o].sessionIds.includes(l)),[P,F]=d(!1),[w,D]=d(!1),[m,b]=d(""),[r,h]=d(!1),v=(o)=>{if(F(o),H(o),A?.(o),!o)D(!1),b("")},p=(o)=>{h(!0),T(o.then(()=>{v(!1)}).finally(()=>h(!1)))};return a(z,{modal:!1,open:P,onOpenChange:(o,I)=>{if(!o&&w&&I.reason==="trigger-hover"){I.cancel();return}v(o)},children:[e(J,{disabled:r,"data-hover-background":O,openOnHover:n||g,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),onMouseDown:(o)=>{if(n)o.preventBaseUIHandler()},onClick:(o)=>{if(!n)return;o.preventBaseUIHandler(),p(c({type:"favorite",sessionId:l}))},render:f??e(N,{variant:"ghost",size:"icon-sm",className:x,"aria-label":t(n&&i!==void 0?"collection.removeFromAll":"collection.addTo"),children:e(u,{className:G(i!==void 0&&"fill-current")})})}),a(L,{className:"w-56 font-normal",side:g?"inline-end":"bottom",align:g?"start":"end",sideOffset:4,children:[e(y,{children:e(_,{value:i??null,children:C.map((o)=>a(K,{value:o,disabled:r||i===o,closeOnClick:!1,onClick:()=>p(c({type:"add",collectionId:o,sessionId:l})),children:[o===B?e(u,{}):s[o].emoji?e("span",{className:"flex size-4 shrink-0 items-center justify-center text-sm","aria-hidden":"true",children:s[o].emoji}):e(S,{}),e("span",{className:"min-w-0 flex-1 truncate",children:ie(s[o],t)})]},o))})}),e(q,{}),a(y,{children:[a(k,{disabled:r,closeOnClick:!1,onClick:()=>D(!0),children:[e(E,{}),t("collection.newCollection")]}),R&&i!==void 0&&a(k,{disabled:r,closeOnClick:!1,onClick:()=>p(c({type:"remove",sessionId:l})),children:[e(u,{}),t("collection.removeFromAll")]})]}),w&&a("form",{className:"flex items-center gap-1 px-2 py-1.5",onSubmit:(o)=>{if(o.preventDefault(),o.stopPropagation(),!m.trim()||r)return;p(c({type:"create",id:`collection-${crypto.randomUUID()}`,name:m,sessionId:l}))},children:[e(Q,{autoFocus:!0,"aria-label":t("collection.collectionName"),placeholder:t("collection.collectionName"),value:m,disabled:r,onChange:(o)=>b(o.target.value),onKeyDown:(o)=>o.stopPropagation(),className:"h-7 min-w-0"}),e(N,{size:"xs",type:"submit",disabled:r||!m.trim(),children:t("collection.confirm")})]})]})]})}function Fs({sessionId:l,allowRemove:f=!0}){let{t:n}=M();return e(Ei,{sessionId:l,allowRemove:f,submenu:!0,trigger:e(j,{icon:e(u,{}),label:n("collection.addTo"),trailing:e(U,{className:"rtl:rotate-180"})})})}
|
|
2
2
|
export{Ei,Fs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{e}from"./chunk-
|
|
1
|
+
import{e}from"./chunk-18gxawh7.js";import{Alert as s,AlertDescription as a,AlertTitle as p}from"@nyssance/shadcn/vega/components/ui/alert";import{Button as m}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as c}from"react/jsx-runtime";function _s({connection:n,error:i,onReconnect:r,className:l="mx-auto w-full max-w-3xl px-6 pt-12"}){let{t:o}=e().host;if(n!=="failed"&&n!=="disconnected")return null;return t("div",{className:l,children:c(s,{variant:"destructive",children:[t(p,{children:n==="failed"?o("connection.failed"):o("connection.disconnected")}),c(a,{className:"flex flex-wrap items-center gap-2",children:[i!==null&&t("span",{className:"font-mono",children:i}),t(m,{size:"sm",variant:"outline",onClick:r,children:o("connection.reconnect")})]})]})})}
|
|
2
2
|
export{_s};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s,a,o,h}from"./chunk-r7z3mvej.js";import{V}from"./chunk-mtcxr3ns.js";import{E,ae,Ue}from"./chunk-
|
|
1
|
+
import{s,a,o,h}from"./chunk-r7z3mvej.js";import{V}from"./chunk-mtcxr3ns.js";import{E,ae,Ue}from"./chunk-gtyrc6cd.js";import{ze,ne,ve}from"./chunk-ezaypwps.js";import{Fr}from"./chunk-qecs9e31.js";import{Ge}from"./chunk-jkqh03w4.js";import{Oe}from"./chunk-g23ktesb.js";import{De}from"./chunk-z930082m.js";import{$n}from"./chunk-ftsqd7n5.js";import{Lr}from"./chunk-7g0cbkbp.js";import{ActivityIcon as D}from"lucide-react";import{useEffect as O,useMemo as A}from"react";import{Kbd as G}from"@nyssance/shadcn/vega/components/ui/kbd";import{jsx as c,jsxs as C,Fragment as H}from"react/jsx-runtime";function K(i,d){return i.find((l)=>l.sessionId===d.sessionId)??{sessionId:d.sessionId,cwd:d.cwd,title:d.title||null,updatedAt:null,archived:!1}}function ba({selectedId:i,onSelect:d,isForeground:l,onOpen:b,accessory:w,rowActions:k}){let R=s(),{t:N}=R,m=o((t)=>t.runStates),S=o((t)=>t.drafts),u=o((t)=>t.sessionList),v=ne((t)=>t.activityOrder),p=A(()=>v.flatMap((t)=>{let e=m[t];return e&&ze({runStates:m,drafts:S},t)?[{sid:t,record:e,sessionRow:K(u,e)}]:[]}),[v,m,S,u]),g=A(()=>{let t=new Map;for(let e of p){let r=e.sid===i||l?.(e.sid)?"foreground":"background",y=t.get(r)??[];y.push(e),t.set(r,y)}return["foreground","background"].filter((e)=>t.has(e)||e==="background").map((e)=>({key:e,rows:t.get(e)??[]}))},[p,i,l]),f=ne((t)=>t.activityCollapsedGroups),n=ve(),L=g.flatMap((t)=>t.key==="foreground"||!f.has(t.key)?t.rows:[]),x=(t)=>{if(b?.(t))return;d(t)},P=Lr();O(()=>{let t=(e)=>{if(e.defaultPrevented||e.isComposing||e.repeat||!Fr(e))return;if(document.querySelector('[role="dialog"], [role="alertdialog"], [role="menu"], [role="listbox"]'))return;let r=Number(e.key);if(!Number.isInteger(r)||r<1||r>9)return;let y=L[r-1];if(!y)return;e.preventDefault(),x(y.sessionRow)};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)});let I=(t)=>{let e=L.indexOf(t);return c(M,{sessionRow:t.sessionRow,state:t.record.state,interruption:t.record.interruption,active:t.sid===i,tasks:t.record.tasks,listeningPorts:t.record.listeningPorts,onOpen:()=>x(t.sessionRow),accessory:w?.(t.sid),actions:k?.(t.sessionRow),hint:e<9&&P?c(G,{children:De(`CommandOrControl+${e+1}`)}):void 0},t.sid)};return c(E,{children:g.map((t)=>t.key==="foreground"?c(E,{children:t.rows.map(I)},t.key):c(ae,{open:!f.has(t.key),onOpenChange:(e)=>{let r=new Set(f);if(e)r.delete(t.key);else r.add(t.key);n({activityCollapsedGroups:r})},leading:c(D,{className:"text-muted-foreground size-3.5 shrink-0"}),label:N("sessionList.background"),count:t.rows.length,children:t.rows.map(I)},t.key))})}function M({sessionRow:i,state:d,interruption:l,active:b,tasks:w,listeningPorts:k,accessory:R,actions:N,onOpen:m,hint:S}){let u=s(),v=a(),{t:p}=u,g=i.title??p("sessionList.untitled"),f=$n(i.sessionId,d);return C(H,{children:[c(Ue,{"data-session-id":i.sessionId,active:b,role:"button",tabIndex:0,hoverCard:c(Oe,{sessionRow:i,actions:N}),onClick:m,onKeyDown:(n)=>{if(n.target!==n.currentTarget)return;if(n.key==="Enter"||n.key===" ")n.preventDefault(),m()},state:d,interruption:l,title:g,preview:f,listeningPorts:k,onOpenPort:u.openLink&&((n)=>u.openLink?.(`http://localhost:${n}`)),accessory:R,hint:S,actions:c(Ge,{title:p("sessionList.stop"),onStop:()=>h(u,v.stopSession(i.sessionId))})}),w.map((n)=>C("div",{className:"border-border/60 before:border-border/60 relative ms-4 flex min-h-7 items-center gap-2 border-s py-1 ps-4 pe-2 text-xs before:absolute before:start-0 before:top-3.5 before:w-2 before:border-t",children:[c(V,{state:"running"}),c("span",{className:"text-muted-foreground min-w-0 flex-1 truncate leading-5",title:n.title,children:n.title})]},n.id))]})}
|
|
2
2
|
export{ba};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b}from"./chunk-
|
|
1
|
+
import{b}from"./chunk-edqxxx93.js";import{Ct}from"./chunk-dzw6vqqf.js";import{e}from"./chunk-18gxawh7.js";import{yt,G}from"./chunk-jtnjd3ec.js";import{kn,Ee}from"./chunk-dhda1jhs.js";import{Ae}from"./chunk-9sag90th.js";import{Zap as g}from"lucide-react";import{jsx as n}from"react/jsx-runtime";function Qs({snapshot:s,model:l,onChange:r,nativeModels:t,catalog:c}){let{host:u}=e(),{t:a}=u,f=[{id:b.id,name:b.name,models:t===void 0?[{api_id:"",label:b.name}]:t.map((o)=>({api_id:o.id,label:o.label??o.id}))},...(s===null?[]:yt(s)).map((o)=>({id:o.id,name:o.name,models:o.models.map((i)=>({api_id:G(o.id,i.id),label:i.label??i.id}))}))],p=Ee(f,c),d=p.flatMap((o)=>o.models),m=l===null?t===void 0?d[0]:{api_id:"",label:a("composer.model")}:d.find((o)=>o.api_id===l)??{api_id:l,label:l};return n(Ct,{value:{...m,label:kn(m)},models:d,modelGroups:p,header:{name:a("composer.model"),action:n(Ae,{})},compactCatalog:!0,booleanOptions:[{id:"fast_mode",name:a("composer.fastMode"),currentValue:!1,disabled:!0,title:a("composer.fastModeUnsupported"),icon:n(g,{className:"size-4","aria-hidden":"true"})}],showModelList:!0,onChange:(o)=>r(o.api_id),t:(o)=>a(o)})}
|
|
2
2
|
export{Qs};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{Wr,Rt}from"./chunk-smd9rszw.js";import{t,w}from"./chunk-
|
|
1
|
+
import{Wr,Rt}from"./chunk-smd9rszw.js";import{t,w}from"./chunk-7393tva2.js";import{createStore as d}from"@alwith/api/client";import{Dialog as f,DialogContent as p,DialogDescription as m,DialogHeader as u,DialogTitle as h}from"@nyssance/shadcn/vega/components/ui/dialog";import{jsx as i,jsxs as l}from"react/jsx-runtime";var c=d({request:null});function Gt(e){c.setState({request:{path:e.path,patch:Qo(e.patch,e.path)}})}function Qo(e,a){let n=e.split(/^(?=diff --git )/m).filter((o)=>o.length>0);if(n.length<=1)return e;return n.find((o)=>{let r=o.split(`
|
|
2
2
|
`,1)[0]??"";return r.endsWith(` b/${a}`)||r.endsWith(` ${a}`)||r.includes(`/${a} `)})??e}function zt(){let{t:e,theme:a}=t(),n=w(c,(o)=>o.request),s=n===null?null:Wr(n.patch);return i(f,{open:n!==null,onOpenChange:(o)=>!o&&c.setState({request:null}),children:l(p,{className:"flex h-[calc(100vh-2.5rem)] max-h-[900px] flex-col gap-3 sm:max-w-[min(1400px,calc(100vw-2.5rem))]",children:[l(u,{children:[i(h,{className:"truncate pe-8 font-mono text-sm font-normal",children:n?.path}),s!==null&&l(m,{children:[l("span",{className:"codex-diff-additions",children:["+",s.additions]})," ",l("span",{className:"codex-diff-deletions",children:["-",s.deletions]})," ",i("span",{children:e("conversation.changedLines")})]})]}),i("div",{className:"min-h-0 min-w-0 flex-1 overflow-hidden rounded-lg border [&>.codex-patch-view]:h-full","data-stream-style":"codexUI",children:n!==null&&i(Rt,{patch:n.patch,theme:a})})]})})}
|
|
3
3
|
export{Gt,Qo,zt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{m}from"./chunk-189aq7st.js";import{s}from"./chunk-r7z3mvej.js";import{v,f}from"./chunk-
|
|
1
|
+
import{m}from"./chunk-189aq7st.js";import{s}from"./chunk-r7z3mvej.js";import{v,f}from"./chunk-gtyrc6cd.js";import{Mt}from"./chunk-5cas0xvp.js";import{cn as r}from"cn";import{ArrowLeftIcon as a,ArrowRightIcon as l,SlidersHorizontalIcon as p}from"lucide-react";import{DropdownMenu as c,DropdownMenuContent as u,DropdownMenuItem as d,DropdownMenuTrigger as g}from"@nyssance/shadcn/vega/components/ui/dropdown-menu";import{jsx as o,jsxs as w}from"react/jsx-runtime";function la({onCollapseAll:i}){let{t:n}=s();return w(c,{children:[o(g,{render:o(Mt,{"aria-label":n("sessionList.filter"),title:n("sessionList.filter")}),children:o(p,{})}),o(u,{align:"end",className:"w-52",children:o(d,{onClick:i,children:n("sessionList.collapseAllGroups")})})]})}function ca({screen:i,onSwitch:n}){let{t:e}=s(),t=e(i==="main"?"sessionList.openLeading":"sessionList.backToMain");return o(f,{className:r(m,i==="main"?"justify-start":"justify-end"),"aria-label":t,title:t,onClick:n,children:o(v,{children:i==="main"?o(a,{}):o(l,{})})})}
|
|
2
2
|
export{la,ca};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Ve}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{Ve}from"./chunk-7393tva2.js";import{createContext as v,useContext as C,useMemo as a}from"react";import{jsx as r}from"react/jsx-runtime";var i=v(null);function An({host:o,client:n,children:t}){let s=a(()=>({host:o,client:n}),[o,n]);return r(Ve,{host:o,client:n,children:r(i,{value:s,children:t})})}function e(){let o=C(i);if(o===null)throw Error("Conversation host is missing");return o}function x(o,n){n.catch((t)=>{if(o.reportError)o.reportError(t);else console.error(t)})}
|
|
2
|
+
export{An,e,x};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-
|
|
1
|
+
import{t}from"./chunk-7393tva2.js";import{Lt}from"./chunk-m395aw24.js";import{Gr,zr,Vr}from"./chunk-54awxpw2.js";import{rs}from"./chunk-36j9fer8.js";import{ue}from"./chunk-wwywmqh8.js";import{nativeTurnId as f,textOf as I}from"@nyssance/codex-acp-v2/client";import{useMemo as N}from"react";import{jsx as r,jsxs as v,Fragment as y}from"react/jsx-runtime";function Aa(i,n){return{installUnlock:n==="none"?()=>()=>{}:zr,preload:()=>{if(n!=="none")Gr(i)},playSequence:(a,d,l)=>Vr(a,d,l,i,n)}}function Si(i,n={},a){let d=[];for(let e of i){if(e.user===null)continue;let o="";for(let m of e.final){let p=I(m.content).trim();if(p.length===0)continue;o=p}let u=n[e.user.id],s=e.items.map(f).find((m)=>m!==null);d.push({id:e.user.id,turnKey:e.key,label:ue(e.user),response:o,inputTokens:u?.inputTokens??0,outputTokens:u?.outputTokens??0,...s===void 0?{}:{nativeTurnId:s}})}if(!a?.complete)return d;let l=new Map;for(let e of d){if(e.nativeTurnId===void 0)continue;let o=l.get(e.nativeTurnId)??[];o.push(e),l.set(e.nativeTurnId,o)}let c=new Set(a.turns.map((e)=>e.turnId)),g=new Set(a.loadedTurnIds);return[...a.turns.flatMap((e)=>{let o=l.get(e.turnId);if(o)return o;if(g.has(e.turnId))return[];let u=a.previews[e.turnId];return((u?.messages.length)?u.messages:[{id:"",label:"",response:""}]).map((s,m)=>({id:`history:${e.turnId}:${m===0?"0":s.id}`,messageId:s.id||void 0,turnKey:`history:${e.turnId}`,nativeTurnId:e.turnId,isLoaded:!1,previewState:u?.state??"loading",label:s.label,response:s.response,inputTokens:0,outputTokens:0}))}),...d.filter((e)=>e.nativeTurnId===void 0||!c.has(e.nativeTurnId))]}function T({item:i}){let n=t(),a=N(()=>({theme:n.theme,copyLabel:n.t("actions.copy"),openLink:()=>{},preview:!0}),[n]);if(i.previewState==="loading")return v("div",{role:"status",className:"animate-pulse space-y-2 py-1","aria-label":n.t("timeline.navigationLoading"),children:[r("div",{className:"bg-muted h-3 w-3/5 rounded"}),r("div",{className:"bg-muted h-3 rounded"}),r("div",{className:"bg-muted h-3 w-4/5 rounded"})]});return v(y,{children:[r("div",{className:"min-w-0 truncate font-medium",children:i.previewState==="unavailable"?n.t("timeline.navigationUnavailable"):i.label||n.t("timeline.navigationEmpty")}),i.response&&r("div",{className:"text-muted-foreground pointer-events-none mt-1 line-clamp-3 [&_img]:hidden [&_pre]:max-h-20 [&_table]:table-fixed","data-navigation-response":!0,children:r(Lt,{text:i.response,host:a})})]})}function _i(i){return r(rs,{...i,renderPreview:(n)=>r(T,{item:n})})}
|
|
2
2
|
export{Aa,Si,_i};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{t}from"./chunk-
|
|
2
|
-
`),b=o?null:pt(n,"assistant"),C=n.items.filter((e)=>e.kind==="tool"&&(e.name==="image_generation"||e.name==="generate_image"||e.name?.endsWith(".generate_image"))&&(e.status==="pending"||e.status==="in_progress")),j=new Set(n.final.flatMap((e)=>e.content.map(se).filter((r)=>r!==null))),h=n.items.flatMap((e)=>{if(!_t(e))return[];return e.content.filter(ce).flatMap((r,g)=>{let u=r.content,k=oe(u),de=fe(u)||re(u)&&"blob"in u.resource;if(!k&&!de)return[];let W=se(u);if(W!==null){if(j.has(W))return[];j.add(W)}return[{key:`${e.id}:${g}`,block:u,index:n.items.indexOf(e)}]})}),J=n.final.some((e)=>L(e._meta).length===0&&e.content.some((r)=>!ge(r)||r.text.trim().length>0)),me=C.length>0||h.length>0||R||J||n.final.some((e)=>L(e._meta).length>0),U=[...n.final.map((e)=>n.items.indexOf(e)),...h.map((e)=>e.index),...C.map((e)=>n.items.indexOf(e))],S=U.length===0?-1:Math.min(...U),q=new Set([...h.map((e)=>n.items[e.index].id),...C.map((e)=>e.id)]),z=F.flatMap((e)=>{if(e.kind!=="activity"||!e.items.some((k)=>q.has(k.id)))return[e];let r=[],g=[],u=()=>{if(g.length===0)return;r.push({...e,key:`activity:${g[0].kind}:${g[0].id}`,items:g}),g=[]};for(let k of e.items)if(g.push(k),q.has(k.id))u();return u(),r}),O=(e)=>n.items.indexOf(e.kind==="activity"?e.items[0]:e.item),X=z.filter((e)=>S===-1||O(e)<S),le=[...z.filter((e)=>S!==-1&&O(e)>=S).map((e)=>({kind:"work",entry:e,index:O(e)})),...h.map((e)=>({kind:"artifact",...e})),...C.map((e)=>({kind:"generation",item:e,index:n.items.indexOf(e)})),...n.final.map((e)=>({kind:"answer",item:e,index:n.items.indexOf(e)}))].toSorted((e,r)=>e.index-r.index),Y=!o&&!m&&(Q.trim().length>0?i(Bo,{text:Q,isMostRecentTurn:E,time:b,afterCopy:H}):f("div",{className:"flex items-center gap-0.5",children:[H,b&&i("span",{className:"codex-user-time ms-1",title:b.full,children:b.short})]})),w=yi({...n,items:p},{running:o,blocked:d,retrying:I!==void 0}),Z=w.kind==="reasoning"?w.ownerKey??null:null,ee=w.kind==="thinking",P=Ti({...n,items:p}),te=o&&!J||c?.active===!0;return f(x,{children:[i(Go,{stateKey:JSON.stringify([s,n.replayed?"history":"live",n.key]),active:te,defaultExpanded:te||c?.defaultExpanded===!0||!n.replayed&&(D||K),...P,durationMs:c?.active?void 0:P.durationMs,startedAt:P.startedAt??T,loading:(ee||w.kind==="working")&&n.work.length===0&&c===null,loadingLabel:w.kind==="working"?y("stream.codex.working"):void 0,work:[...(c?.entries??[]).filter((e)=>e.afterItemId===null||n.user?.id===e.afterItemId).map((e,r)=>i(v,{children:e.content},`prompt-detail:${r}`)),...m||R?[]:X.map((e)=>i(G,{entries:c?.entries,sessionId:s,entry:e,terminals:l,streaming:o,streamingThoughtId:Z},e.key)),...c===null?[]:[i(v,{children:c.content},"additional-work")]],answer:me||m?f("div",{className:"flex min-w-0 flex-col gap-3",children:[(m||R)&&X.map((e)=>i(G,{entries:c?.entries,sessionId:s,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key)),le.map((e)=>{if(e.kind==="work")return i(G,{entries:c?.entries,sessionId:s,entry:e.entry,terminals:l,streaming:o,streamingThoughtId:Z},e.entry.key);if(e.kind==="artifact")return i("div",{className:"codex-reply-artifacts flex min-w-0 flex-col gap-3",children:i(Te,{content:[e.block],messageId:e.key,streaming:!1})},e.key);if(e.kind==="generation")return f("div",{className:"codex-image-generation",role:"status","aria-label":y(o?"timeline.imageGenerating":"timeline.imageStopped"),"aria-busy":o,children:[i("div",{className:"codex-image-generation-texture","aria-hidden":"true"}),f("span",{className:"codex-image-generation-status",children:[o&&i(hi,{startedAt:e.item.at}),!o&&y("timeline.imageStopped")]})]},e.item.id);let r=e.item;return f(v,{children:[L(r._meta).length>0?i(so,{sessionId:s,item:r}):i(Te,{content:
|
|
1
|
+
import{t}from"./chunk-7393tva2.js";import{Bo,Go}from"./chunk-f0gq9f1f.js";import{L}from"./chunk-xq4xeksc.js";import{_t}from"./chunk-h1t76wws.js";import{io}from"./chunk-ywax4zad.js";import{Pi,ue,mt,Ti}from"./chunk-wwywmqh8.js";import{eo}from"./chunk-7dy4z3r8.js";import{Te}from"./chunk-4mca4p7m.js";import{to}from"./chunk-tnmghaap.js";import{so}from"./chunk-mjfc1dyv.js";import{xi}from"./chunk-j1kf4cj2.js";import{hi}from"./chunk-2d8msv4h.js";import{fi}from"./chunk-eedgav4q.js";import{yi}from"./chunk-eexn5mmk.js";import{no,oo}from"./chunk-pyx2n7yx.js";import{pt}from"./chunk-1bvgs2t1.js";import{codexMessageError as ne,codexTurnError as ie,isContentEntry as ce,isEmbeddedResource as re,isImage as oe,isResourceLink as fe,isText as ge,nativeTurnId as pe}from"@nyssance/codex-acp-v2/client";import{SparklesIcon as ye}from"lucide-react";import{Fragment as v,memo as he,useEffect as ke,useState as xe}from"react";import{jsx as i,jsxs as f,Fragment as x}from"react/jsx-runtime";import{createElement as ve}from"react";function se(s){if(oe(s))return`${s.mimeType.toLowerCase()}:${s.data}`;if(re(s)&&"blob"in s.resource&&s.resource.mimeType?.toLowerCase().startsWith("image/"))return`${s.resource.mimeType.toLowerCase()}:${s.resource.blob}`;return null}function Ie({item:s}){let{t:n}=t(),l=s.status==="in_progress",[o,d]=xe(()=>Date.now()-s.at>=1e4);return ke(()=>{if(!l)return;let m=Math.max(0,s.at+1e4-Date.now());if(d(m===0),m===0)return;let a=setTimeout(()=>d(!0),m);return()=>clearTimeout(a)},[s.id,s.at,l]),f("div",{className:"codex-context-compaction",children:[i(ye,{"aria-hidden":"true"}),i("span",{children:s.status==="completed"?n("stream.codex.contextCompacted"):s.status==="cancelled"?n("timeline.interrupted"):n(o?"timeline.compactingWithDelayNotice":"timeline.compacting")})]})}function V({sessionId:s,entry:n,terminals:l,streaming:o,streamingThoughtId:d}){let{t:m}=t();switch(n.kind){case"activity":return i(eo,{sessionId:s,items:n.items,terminals:l,streamingThoughtId:d});case"text":return L(n.item._meta).length>0?i(so,{sessionId:s,item:n.item}):i(Te,{content:n.item.content,messageId:n.item.id,streaming:o});case"plan":return i(fi,{plan:n.item.plan});case"compaction":if(n.item.status==="failed")return f(no,{children:[i("div",{children:m("timeline.compactionFailed")}),n.item.error!==null&&i("div",{children:n.item.error})]});return i(Ie,{item:n.item})}}function G(s){let{entry:n,entries:l=[]}=s;if(n.kind!=="activity")return f(x,{children:[i(V,{...s}),l.filter((a)=>a.afterItemId===n.item.id).map((a,p)=>i(v,{children:a.content},`${a.afterItemId}:${p}`))]});let o=[],d=[],m=()=>{if(d.length===0)return;let a=d[0];o.push(ve(V,{...s,key:`${n.key}:${a.id}`,entry:{...n,key:`${n.key}:${a.id}`,items:d}})),d=[]};for(let a of n.items){d.push(a);let p=l.filter((T)=>T.afterItemId===a.id);if(p.length>0)m(),p.forEach((T,E)=>o.push(i(v,{children:T.content},`${a.id}:detail:${E}`)))}return m(),i(x,{children:o})}function we({sessionId:s,turn:n,terminals:l,active:o,blocked:d=!1,continued:m=!1,edits:a=n.edits,activityItems:p=n.items,workStartedAt:T=n.startedAt,isLast:E,error:N,interrupted:D,retry:B,retrying:I,extraWork:c=null,answerActions:H,footer:ae}){let{t:y}=t(),_=n.errors.map((e)=>{let r=ne(e);if(r===null)throw Error("Turn error item is missing its diagnostics");let g=B?.turnId===pe(e)?B:void 0;return i(oo,{error:r,retry:g},`${e.id}:${g?.delaySeconds??"manual"}`)});if(E&&N!==null&&!n.errors.some((e)=>{let r=ne(e);return r!==null&&r.stopReason===N.stopReason&&ie(r).message===ie(N).message}))_.push(i(oo,{error:N},"current-run-error"));let A=_.length>0?i("div",{className:"codex-turn-errors",children:_}):null,M=n.items.filter(io);if(c===null&&M.length>0&&M.length===n.items.length)return f(x,{children:[i(eo,{sessionId:s,items:M,terminals:l,streamingThoughtId:null}),A]});let F=n.work,R=F.length>0&&F.every((e)=>e.kind==="compaction");if(c===null&&(Pi(n)||R&&n.final.length===0))return f(x,{children:[i("div",{role:"status",className:"text-muted-foreground flex min-w-0 flex-col gap-2 py-2 text-sm",children:n.work.map((e)=>i(V,{sessionId:s,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key))}),A]});let K=mt(n),Q=n.final.filter((e)=>L(e._meta).length===0).map((e)=>ue({...e,content:to(e.content,n.items)})).join(`
|
|
2
|
+
`),b=o?null:pt(n,"assistant"),C=n.items.filter((e)=>e.kind==="tool"&&(e.name==="image_generation"||e.name==="generate_image"||e.name?.endsWith(".generate_image"))&&(e.status==="pending"||e.status==="in_progress")),j=new Set(n.final.flatMap((e)=>e.content.map(se).filter((r)=>r!==null))),h=n.items.flatMap((e)=>{if(!_t(e))return[];return e.content.filter(ce).flatMap((r,g)=>{let u=r.content,k=oe(u),de=fe(u)||re(u)&&"blob"in u.resource;if(!k&&!de)return[];let W=se(u);if(W!==null){if(j.has(W))return[];j.add(W)}return[{key:`${e.id}:${g}`,block:u,index:n.items.indexOf(e)}]})}),J=n.final.some((e)=>L(e._meta).length===0&&e.content.some((r)=>!ge(r)||r.text.trim().length>0)),me=C.length>0||h.length>0||R||J||n.final.some((e)=>L(e._meta).length>0),U=[...n.final.map((e)=>n.items.indexOf(e)),...h.map((e)=>e.index),...C.map((e)=>n.items.indexOf(e))],S=U.length===0?-1:Math.min(...U),q=new Set([...h.map((e)=>n.items[e.index].id),...C.map((e)=>e.id)]),z=F.flatMap((e)=>{if(e.kind!=="activity"||!e.items.some((k)=>q.has(k.id)))return[e];let r=[],g=[],u=()=>{if(g.length===0)return;r.push({...e,key:`activity:${g[0].kind}:${g[0].id}`,items:g}),g=[]};for(let k of e.items)if(g.push(k),q.has(k.id))u();return u(),r}),O=(e)=>n.items.indexOf(e.kind==="activity"?e.items[0]:e.item),X=z.filter((e)=>S===-1||O(e)<S),le=[...z.filter((e)=>S!==-1&&O(e)>=S).map((e)=>({kind:"work",entry:e,index:O(e)})),...h.map((e)=>({kind:"artifact",...e})),...C.map((e)=>({kind:"generation",item:e,index:n.items.indexOf(e)})),...n.final.map((e)=>({kind:"answer",item:e,index:n.items.indexOf(e)}))].toSorted((e,r)=>e.index-r.index),Y=!o&&!m&&(Q.trim().length>0?i(Bo,{text:Q,isMostRecentTurn:E,time:b,afterCopy:H}):f("div",{className:"flex items-center gap-0.5",children:[H,b&&i("span",{className:"codex-user-time ms-1",title:b.full,children:b.short})]})),w=yi({...n,items:p},{running:o,blocked:d,retrying:I!==void 0}),Z=w.kind==="reasoning"?w.ownerKey??null:null,ee=w.kind==="thinking",P=Ti({...n,items:p}),te=o&&!J||c?.active===!0;return f(x,{children:[i(Go,{stateKey:JSON.stringify([s,n.replayed?"history":"live",n.key]),active:te,defaultExpanded:te||c?.defaultExpanded===!0||!n.replayed&&(D||K),...P,durationMs:c?.active?void 0:P.durationMs,startedAt:P.startedAt??T,loading:(ee||w.kind==="working")&&n.work.length===0&&c===null,loadingLabel:w.kind==="working"?y("stream.codex.working"):void 0,work:[...(c?.entries??[]).filter((e)=>e.afterItemId===null||n.user?.id===e.afterItemId).map((e,r)=>i(v,{children:e.content},`prompt-detail:${r}`)),...m||R?[]:X.map((e)=>i(G,{entries:c?.entries,sessionId:s,entry:e,terminals:l,streaming:o,streamingThoughtId:Z},e.key)),...c===null?[]:[i(v,{children:c.content},"additional-work")]],answer:me||m?f("div",{className:"flex min-w-0 flex-col gap-3",children:[(m||R)&&X.map((e)=>i(G,{entries:c?.entries,sessionId:s,entry:e,terminals:l,streaming:!1,streamingThoughtId:null},e.key)),le.map((e)=>{if(e.kind==="work")return i(G,{entries:c?.entries,sessionId:s,entry:e.entry,terminals:l,streaming:o,streamingThoughtId:Z},e.entry.key);if(e.kind==="artifact")return i("div",{className:"codex-reply-artifacts flex min-w-0 flex-col gap-3",children:i(Te,{content:[e.block],messageId:e.key,streaming:!1})},e.key);if(e.kind==="generation")return f("div",{className:"codex-image-generation",role:"status","aria-label":y(o?"timeline.imageGenerating":"timeline.imageStopped"),"aria-busy":o,children:[i("div",{className:"codex-image-generation-texture","aria-hidden":"true"}),f("span",{className:"codex-image-generation-status",children:[o&&i(hi,{startedAt:e.item.at}),!o&&y("timeline.imageStopped")]})]},e.item.id);let r=e.item;return f(v,{children:[L(r._meta).length>0?i(so,{sessionId:s,item:r}):i(Te,{content:to(r.content,n.items),messageId:r.id,streaming:o}),r===n.final.at(-1)&&h.length===0&&Y]},r.id)}),(n.final.length===0||h.length>0)&&Y]}):null,footer:f(x,{children:[ee&&n.work.length>0&&i("div",{className:"codex-pending-message py-2",role:"status",children:i("span",{className:"codex-activity-running",children:y("message.thinking")})}),ae,a.length>0&&!o&&!m&&i(xi,{items:a}),D&&!K&&i("div",{className:"codex-interrupted-turn",role:"status",children:y("timeline.interrupted")}),!o&&A]})}),o&&I!==void 0&&i("div",{className:"text-muted-foreground py-2 text-sm",role:"status",children:I.capacity?(()=>{let e=/Reconnecting(?:\.\.\.)?\s+(\d+\/\d+)/.exec(I.message)?.[1];return e===void 0?y("timeline.capacityReconnecting"):y("timeline.capacityReconnectingProgress",{progress:e})})():I.message}),o&&A]})}var gi=he(we);
|
|
3
3
|
export{gi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{w}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{w}from"./chunk-7393tva2.js";import{e}from"./chunk-18gxawh7.js";import{useRef as y,useState as m}from"react";import{Button as u}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as n,jsxs as f}from"react/jsx-runtime";function wn({client:s,session:t}){let{host:r}=e(),[a,l]=m(!1),[d,c]=m(null),i=y(!1),p=w(s.store,(o)=>o.connection==="ready"),v=a||!p||t.restoring;async function g(){if(i.current||!p||t.restoring)return;i.current=!0,c(null),l(!0);try{await s.open(t.id,t.cwd)}catch(o){c(o instanceof Error?o.message:String(o))}finally{i.current=!1,l(!1)}}return f("div",{className:"text-muted-foreground flex flex-wrap items-center gap-3 px-4 py-3 text-sm","aria-busy":a,"data-model-recovery":!0,children:[f("div",{className:"min-w-0 flex-1 basis-full",children:[n("p",{children:r.t("provider.modelUnavailable")}),d&&n("p",{role:"alert",className:"text-destructive break-words",children:d})]}),r.openSettings&&n(u,{size:"sm",variant:"outline",onClick:()=>void r.openSettings?.("provider"),children:r.t("settings.provider")}),n(u,{size:"sm",disabled:v,onClick:()=>void g(),children:r.t(t.restoring?"conversation.restoring":"provider.retry")})]})}
|
|
2
|
+
export{wn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n}from"./chunk-
|
|
2
|
-
export{Xe,
|
|
1
|
+
import{n}from"./chunk-7393tva2.js";import{e}from"./chunk-18gxawh7.js";import{y,Y}from"./chunk-p781sb6h.js";import{hasAccount as D,isGroupedSelect as L}from"@nyssance/codex-acp-v2/client";import{cn as H}from"cn";import{memo as W,useEffect as T,useState as F}from"react";import{HoverCard as z,HoverCardContent as O,HoverCardTrigger as U}from"@nyssance/shadcn/vega/components/ui/hover-card";import{jsx as r,jsxs as u}from"react/jsx-runtime";var d=new Intl.NumberFormat("en-US",{maximumFractionDigits:0}),A=new Intl.NumberFormat("en-US",{style:"percent",maximumFractionDigits:1}),I=new Intl.NumberFormat("en-US",{maximumFractionDigits:1});function f(a){return typeof a==="number"&&!Number.isNaN(a)?Math.max(0,a):0}function V(a,t){let o=Math.min(100,a/t*100),p=o>=90?"text-destructive":o>=70?"text-foreground":"text-muted-foreground";return{pct:o,className:p}}function G(a){let t=y(a.configOptions,"model");return t===void 0?void 0:Y(t)}function Xe(a,t){let o=a.windowDurationMins;if(o===null)return t("usage.usage");if(o%1440===0)return t("usage.windowDays",{count:o/1440});return t("usage.windowHours",{count:Math.round(o/60)})}function P(a){let{client:t}=e(),o=n((s)=>a&&s.connection==="ready"&&D(s.agent)),[p,c]=F(null);return T(()=>{if(!o){c(null);return}let s=!0;t.readRateLimits().then((m)=>{if(s)c(m)},()=>{return});let l=t.onRateLimits((m)=>{if(s)c(m)});return()=>{s=!1,l()}},[o,t]),o?p:null}function _({session:a}){let{t}=e().host,o=y(a.configOptions,"model"),p=o!==void 0&&(L(o.options)?o.options.some((i)=>i.groupId==="chatgpt"&&i.options.some((v)=>v.value===o.currentValue)):!o.currentValue.startsWith("gateway:")&&o.options.some((i)=>i.value===o.currentValue)),c=P(p),{usage:s,lastTurnUsage:l}=a;if(s===null&&l===null)return null;let m=s&&s.size>0?V(s.used,s.size):null,x=7,b=2*Math.PI*x,h=f(l?.inputTokens),k=f(l?.outputTokens),g=f(l?.cachedReadTokens),w=f(l?.cachedWriteTokens),S=f(l?.totalTokens)||h+k+g+w,R=h+g,C=R>0?A.format(g/R):t("tokens.notAvailable"),M=[[t("tokens.input"),d.format(h)],[t("tokens.output"),d.format(k)],[t("tokens.cachedRead"),d.format(g)],[t("tokens.cachedWrite"),d.format(w)],[t("tokens.cacheHitRate"),C],[t("tokens.total"),d.format(S)]],N=G(a);return u(z,{children:[r(U,{delay:100,closeDelay:100,render:u("button",{type:"button",className:H("hover:text-foreground flex h-7 items-center gap-1.5 rounded-md px-1.5 text-xs tabular-nums",m?.className??"text-muted-foreground"),"aria-label":t("tokens.openDetails"),children:[u("svg",{viewBox:"0 0 18 18",className:"size-4","aria-hidden":"true",children:[r("circle",{cx:"9",cy:"9",r:x,fill:"none",stroke:"currentColor",strokeOpacity:"0.2",strokeWidth:"2"}),m!==null&&r("circle",{cx:"9",cy:"9",r:x,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:b,strokeDashoffset:b*(1-m.pct/100),transform:"rotate(-90 9 9)"})]}),m!==null&&u("span",{children:[Math.round(m.pct),"%"]})]})}),u(O,{align:"end",side:"top",sideOffset:8,className:"w-56 p-0",children:[N!==void 0&&r("div",{className:"border-b px-3 py-2",children:r("p",{className:"text-foreground truncate text-xs font-semibold",title:N,children:N})}),u("div",{className:"flex flex-col gap-3 p-3",children:[l!==null&&u("div",{className:"flex flex-col gap-1.5",children:[r("p",{className:"text-xs font-medium",children:t("tokens.openDetails")}),r("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:M.map(([i,v])=>u("div",{className:"contents",children:[r("dt",{className:"text-muted-foreground",children:i}),r("dd",{className:"text-end tabular-nums",children:v})]},i))})]}),s!==null&&s.size>0&&u("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[r("p",{className:"text-xs font-medium",children:t("tokens.context")}),r("p",{className:"text-muted-foreground text-xs tabular-nums",children:t("tokens.contextSummary",{used:d.format(s.used),limit:d.format(s.size),percent:I.format(s.used/s.size*100)})})]}),c!==null&&(c.primary!==null||c.secondary!==null)&&u("div",{className:"flex flex-col gap-1.5 border-t pt-2",children:[r("p",{className:"text-xs font-medium",children:t("usage.limits")}),r("dl",{className:"grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 text-xs",children:[c.primary,c.secondary].filter((i)=>i!==null).map((i)=>u("div",{className:"contents",children:[r("dt",{className:"text-muted-foreground",children:Xe(i,t)}),r("dd",{className:"text-end tabular-nums",children:t("usage.used",{percent:Math.round(Math.min(100,Math.max(0,i.usedPercent)))})})]},`${i.windowDurationMins??"window"}`))})]})]})]})]})}var xn=W(_);
|
|
2
|
+
export{Xe,xn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./chunk-
|
|
1
|
+
import{t}from"./chunk-7393tva2.js";import{useLayoutEffect as b,useRef as g,useState as h}from"react";import{jsx as x}from"react/jsx-runtime";var d=[[0,3],[0.1,25],[0.55,58],[0.85,88],[1,90]];function Ia(a,u){let e=Math.max(0,(u-a)/45000);for(let n=1;n<d.length;n+=1){let[c,r]=d[n-1],[s,l]=d[n];if(e<=s){let o=(e-c)/(s-c);return Math.floor(r+o*(l-r))}}return Math.min(99,Math.floor(90+10*(1-Math.exp(-1.5*(e-1)))))}function hi({startedAt:a}){let{t:u}=t(),e=g(null),[n,c]=h(3);b(()=>{let s=e.current.ownerDocument,l=!1,o,m=()=>{clearInterval(o),o=void 0},f=()=>{let i=Ia(a,Date.now());if(c(i),i===99)m();return i},p=()=>{if(m(),l&&!s.hidden&&f()<99)o=setInterval(f,500)};f();let v=new IntersectionObserver(([i])=>{l=i.isIntersecting,p()});return v.observe(e.current),s.addEventListener("visibilitychange",p),()=>{v.disconnect(),s.removeEventListener("visibilitychange",p),m()}},[a]);let r=u("timeline.imageProgressPercent",{percent:n});return x("span",{ref:e,role:"status",title:r,"aria-label":r,className:"text-xs tabular-nums",children:r})}
|
|
2
2
|
export{Ia,hi};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{inSessionTree as _,nativeTurnId as k}from"@nyssance/codex-acp-v2/client";function a(i){return i!==null&&typeof i==="object"&&!Array.isArray(i)?i:null}function r(i){return typeof i==="string"&&i.length>0?i:null}function R(i){switch(i){case"completed":return"completed";case"errored":return"failed";case"interrupted":case"shutdown":return"interrupted";default:return"unknown"}}function
|
|
2
|
-
export{
|
|
1
|
+
import{inSessionTree as _,nativeTurnId as k}from"@nyssance/codex-acp-v2/client";function a(i){return i!==null&&typeof i==="object"&&!Array.isArray(i)?i:null}function r(i){return typeof i==="string"&&i.length>0?i:null}function R(i){switch(i){case"completed":return"completed";case"errored":return"failed";case"interrupted":case"shutdown":return"interrupted";default:return"unknown"}}function Qn(i,l,p,S,b=p[i]){let f=b?.items??l.items,I=new Set(l.items.map(k).filter((t)=>t!==null)),A=new Set([...I].filter((t)=>{let n=f.find((e)=>e.kind==="user"&&k(e)===t)??f.find((e)=>k(e)===t);return l.items.some((e)=>e.kind===n?.kind&&e.id===n.id)})),T=Object.values(p).filter((t)=>t.subagent?.parentId===i),u=new Map,h=new Set,x=new Set(l.items.map((t)=>t.id)),y=(t,n,e,s)=>{if(h.add(t),!x.has(s))return;if(!u.has(t))u.set(t,{key:t,threadId:t,title:n,description:e,status:"unknown",originItemId:s})};for(let t of f){if(t.kind!=="tool")continue;let n=a(t._meta?.codex),e=a(n?.subagent),s=a(t.rawInput);if(e?.activity==="started"||s?.activity==="started"){let c=r(e?.threadId)??r(s?.agentThreadId),d=r(e?.path)??r(s?.agentPath);if(c)y(c,d?.split("/").findLast(Boolean)??null,null,t.id)}let o=a(n?.collaboration);if(o?.tool==="spawnAgent"||t.title==="spawnAgent"){let c=o?.receiverThreadIds??s?.receiverThreadIds,d=Array.isArray(o?.agents)?o.agents.map(a):[];if(Array.isArray(c))for(let g of c){let m=r(g);if(!m)continue;let w=d.find((v)=>v?.threadId===m);y(m,r(w?.nickname)??r(w?.role),r(s?.prompt),t.id)}}}for(let t of T){let n=a(t.subagent?._meta?.codex),e=r(n?.threadId),s=r(n?.parentTurnId),o=e===null?void 0:u.get(e);if(!o&&(e!==null&&h.has(e)||s===null||!A.has(s)))continue;let c=e??t.id;u.set(c,{...o,key:c,threadId:e,title:t.title,description:t.subagent?.description??null,session:t,status:"unknown"})}for(let t of f){if(t.kind!=="tool")continue;let n=a(t._meta?.codex),e=a(n?.collaboration);if(Array.isArray(e?.agents))for(let c of e.agents){let d=a(c),g=u.get(r(d?.threadId)??"");if(g)g.status=R(a(d?.state)?.status)}let s=a(n?.subagent),o=u.get(r(s?.threadId)??"");if(o&&s?.activity==="completed")o.status="completed";if(o&&s?.activity==="interrupted")o.status="interrupted"}for(let t of u.values()){let n=t.session;if(!n)continue;if(S.some((e)=>_(p,n.id,e.sessionId))||n.state==="requires_action")t.status="requires_action";else if(n.attached&&n.state==="running")t.status="running";else if(n.error||n.lastStopReason==="error")t.status="failed";else if(n.lastStopReason==="cancelled")t.status="interrupted";else if(n.lastStopReason==="end_turn")t.status="completed";else if(t.status==="unknown")t.status=!n.attached?"detached":n.state}return[...u.values()]}
|
|
2
|
+
export{Qn};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function rr(t){return Object.entries(t.properties??{}).map(([n,e])=>({key:n,property:e}))}function mo(t){let{title:n,description:e}=t;return{title:n??void 0,description:e??void 0}}function Ye(t){return t.type==="array"}function
|
|
2
|
-
export{rr,mo,Ye,
|
|
1
|
+
function rr(t){return Object.entries(t.properties??{}).map(([n,e])=>({key:n,property:e}))}function mo(t){let{title:n,description:e}=t;return{title:n??void 0,description:e??void 0}}function Ye(t){return t.type==="array"}function En(t){return(Ye(t)?t.items?.oneOf??[]:t.oneOf??[]).map((e)=>{let i=e,r=i.const??i.title??"";return{value:r,label:i.title??r,...i.description?{description:i.description}:{},...i._meta?.alwith?.preview?{preview:i._meta.alwith.preview}:{}}})}
|
|
2
|
+
export{rr,mo,Ye,En};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var Hn={models:[{slug:"glm-5.3",display_name:"GLM-5.3",description:"GLM-5.3 via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"glm-5.3-flash",display_name:"GLM-5.3-Flash",description:"GLM-5.3-Flash via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"glm-5.2",display_name:"GLM-5.2",description:"GLM-5.2 via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"none",description:"Disable reasoning"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"glm-5.1",display_name:"GLM-5.1",description:"GLM-5.1 via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text"],context_window:200000,max_context_window:200000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"MiniMax-M3.1-Flash",display_name:"MiniMax M3.1 Flash",description:"MiniMax M3.1 Flash via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"xhigh",description:"Xhigh reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"MiniMax-M3",display_name:"MiniMax M3",description:"MiniMax M3 via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-evolving",display_name:"Doubao Seed Evolving",description:"Doubao Seed Evolving via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2-1-pro-260915",display_name:"Doubao Seed 2.1 Pro",description:"Doubao Seed 2.1 Pro via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2-1-lite-260915",display_name:"Doubao Seed 2.1 Lite",description:"Doubao Seed 2.1 Lite via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"kimi-k3.1-pro",display_name:"Kimi K3.1 Pro",description:"Kimi K3.1 Pro via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"kimi-k3",display_name:"Kimi K3",description:"Kimi K3 via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"kimi-k2.7-code",display_name:"Kimi K2.7 Code",description:"Kimi K2.7 Code via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:262144,max_context_window:262144,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"mimo-v2.6-pro",display_name:"MiMo V2.6 Pro",description:"MiMo V2.6 Pro via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"mimo-v2.6-flash",display_name:"MiMo V2.6 Flash",description:"MiMo V2.6 Flash via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2.1-pro",display_name:"Doubao Seed 2.1 Pro",description:"Doubao Seed 2.1 Pro via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2.1-lite",display_name:"Doubao Seed 2.1 Lite",description:"Doubao Seed 2.1 Lite via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"}]};
|
|
2
|
-
export{
|
|
1
|
+
var Un={models:[{slug:"glm-5.3",display_name:"GLM-5.3",description:"GLM-5.3 via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"glm-5.3-flash",display_name:"GLM-5.3-Flash",description:"GLM-5.3-Flash via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"glm-5.2",display_name:"GLM-5.2",description:"GLM-5.2 via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"none",description:"Disable reasoning"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"glm-5.1",display_name:"GLM-5.1",description:"GLM-5.1 via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text"],context_window:200000,max_context_window:200000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"MiniMax-M3.1-Flash",display_name:"MiniMax M3.1 Flash",description:"MiniMax M3.1 Flash via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"xhigh",description:"Xhigh reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"MiniMax-M3",display_name:"MiniMax M3",description:"MiniMax M3 via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1e6,max_context_window:1e6,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-evolving",display_name:"Doubao Seed Evolving",description:"Doubao Seed Evolving via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2-1-pro-260915",display_name:"Doubao Seed 2.1 Pro",description:"Doubao Seed 2.1 Pro via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2-1-lite-260915",display_name:"Doubao Seed 2.1 Lite",description:"Doubao Seed 2.1 Lite via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"kimi-k3.1-pro",display_name:"Kimi K3.1 Pro",description:"Kimi K3.1 Pro via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"kimi-k3",display_name:"Kimi K3",description:"Kimi K3 via the Responses API.",default_reasoning_level:"max",supported_reasoning_levels:[{effort:"low",description:"Low reasoning effort"},{effort:"high",description:"High reasoning effort"},{effort:"max",description:"Max reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"kimi-k2.7-code",display_name:"Kimi K2.7 Code",description:"Kimi K2.7 Code via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:262144,max_context_window:262144,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"mimo-v2.6-pro",display_name:"MiMo V2.6 Pro",description:"MiMo V2.6 Pro via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"mimo-v2.6-flash",display_name:"MiMo V2.6 Flash",description:"MiMo V2.6 Flash via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1048576,max_context_window:1048576,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2.1-pro",display_name:"Doubao Seed 2.1 Pro",description:"Doubao Seed 2.1 Pro via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"},{slug:"doubao-seed-2.1-lite",display_name:"Doubao Seed 2.1 Lite",description:"Doubao Seed 2.1 Lite via the Responses API.",default_reasoning_level:"high",supported_reasoning_levels:[{effort:"minimal",description:"Disable reasoning"},{effort:"low",description:"Low reasoning effort"},{effort:"medium",description:"Medium reasoning effort"},{effort:"high",description:"High reasoning effort"}],shell_type:"unified_exec",visibility:"list",supported_in_api:!0,priority:0,support_verbosity:!1,supports_reasoning_summary_parameter:!1,truncation_policy:{mode:"bytes",limit:1e4},experimental_supported_tools:[],input_modalities:["text","image"],context_window:1024000,max_context_window:1024000,base_instructions:"You are a coding agent helping the user complete tasks in their workspace. Follow the user and project instructions. Use the provided tools when needed, verify changes, and report results accurately.",include_apps_usage_instructions:!1,default_reasoning_summary:"none"}]};
|
|
2
|
+
export{Un};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{T}from"./chunk-fpsn6fmf.js";import{n}from"./chunk-
|
|
2
|
-
export{
|
|
1
|
+
import{T}from"./chunk-fpsn6fmf.js";import{n}from"./chunk-7393tva2.js";import{ut}from"./chunk-avq6x733.js";import{y,Y}from"./chunk-p781sb6h.js";import{e}from"./chunk-18gxawh7.js";import{Qn}from"./chunk-2dq1epq4.js";import{ChevronDownIcon as A,ChevronRightIcon as G,GitBranchIcon as X,Loader2Icon as F,SquareIcon as Z}from"lucide-react";import{useCallback as ss,useEffect as es,useId as J,useRef as L,useState as w}from"react";import{Button as C}from"@nyssance/shadcn/vega/components/ui/button";import{jsx as t,jsxs as h}from"react/jsx-runtime";function Zn(s,d){let p=n((l)=>l.sessions),o=n((l)=>l.actions),[k,f]=w(()=>new Set);return(l)=>{let r=d?.(l)??null,i=Qn(s.id,l,p,o,s);if(i.length===0)return r;let b=`${s.id}:${l.key}`,u=new Map;for(let c of i){let x=l.items.find((g)=>g.id===c.originItemId)?.id??l.user?.id??null,m=u.get(x)??[];m.push(c),u.set(x,m)}return{active:r?.active===!0||i.some((c)=>c.status==="running"||c.status==="requires_action"),defaultExpanded:r?.defaultExpanded===!0||k.has(b),content:r?.content??null,entries:[...r?.entries??[],...[...u].map(([c,x])=>({afterItemId:c,content:t(Zo,{sessionId:s.id,turn:l,parent:s,tasks:x,onExpand:()=>f((m)=>m.has(b)?m:new Set([...m,b]))})}))]}}}function Zo({sessionId:s,turn:d,parent:p,tasks:o,onExpand:k}){let{host:f}=e(),l=n((a)=>a.sessions),r=n((a)=>a.actions),i=o??Qn(s,d,l,r,p),b=i.some((a)=>a.status==="running"),u=i.some((a)=>a.status==="running"||a.status==="requires_action"),[c,x]=T(`subagents:${s}:${d.key}`,u,!0),m=J();if(i.length===0)return null;let g=new Map;for(let a of i)g.set(a.status,(g.get(a.status)??0)+1);let N=[...g].map(([a,I])=>`${f.t(`subagents.${a}`)} ${I}`).join(" · ");return h("section",{"data-subagent-sessions":!0,"data-subagent-turn":d.key,"aria-label":f.t("subagents.group"),className:"my-2 min-w-0",children:[h(C,{variant:"ghost",size:"sm",className:"text-muted-foreground h-auto min-h-8 max-w-full justify-start gap-2 text-xs","aria-expanded":c,"aria-controls":m,onClick:()=>{if(!c)k?.();x(!c)},children:[c?t(A,{className:"size-3.5 shrink-0"}):t(G,{className:"size-3.5 shrink-0"}),b?t(F,{className:"size-3.5 shrink-0 motion-safe:animate-spin","aria-hidden":"true"}):t(X,{className:"size-3.5 shrink-0"}),h("span",{className:"shrink-0",children:[f.t("subagents.group")," · ",i.length]}),t("span",{className:"truncate",role:"status",children:N})]}),t("div",{id:m,hidden:!c,className:"border-border ms-3 min-w-0 border-s ps-2",children:i.map((a)=>t(ts,{task:a,cwd:p?.cwd??l[s]?.cwd??"",visible:c,stateKey:`${s}:${d.key}:${a.key}`,onRead:()=>{k?.(),x(!0)}},a.key))})]})}function O(s,d){if(!d)return s;let p=new Map(s.items.map((o)=>[`${o.kind}:${o.id}`,o]));for(let o of d.items)p.set(`${o.kind}:${o.id}`,o);return{...s,...d,items:[...p.values()]}}function ts({task:s,cwd:d,stateKey:p,visible:o,onRead:k}){let{client:f,host:l}=e(),{t:r}=l,i=s.session,b=n((S)=>S.connection==="ready"),[u,c]=T(`subagent:${p}`,!1),[x,m]=w(!1),[g,N]=w(null),[a,I]=w(null),[R,Q]=w(null),[B,P]=w(!1),q=L(!1),_=L(!1),j=J(),W=i&&y(i.configOptions,"model"),z=s.title??r("subagents.untitled"),M=a?O(a,i):i,U=b&&i?.attached&&i.subagent?.capabilities?.cancel!=null&&(s.status==="running"||s.status==="requires_action"),H=s.threadId,D=i?.cwd??d,E=ss(async(S)=>{if(!f.readSubagentHistory||H===null||q.current)return;_.current=!0,q.current=!0,P(!0),N(null);try{let v=await f.readSubagentHistory(H,D,S);I((K)=>K===null?v.session:O(v.session,K)),Q(v.cursor)}catch(v){N(v instanceof Error?v.message:String(v))}finally{q.current=!1,P(!1)}},[f,H,D]);es(()=>{if(o&&u&&!_.current)E(null)},[o,u,E]);let V=async()=>{if(!i)throw Error("A live child session is required for cancellation");m(!0),N(null);try{await f.cancel(i.id)}catch(S){N(S instanceof Error?S.message:String(S))}finally{m(!1)}};return h("section",{"aria-label":z,className:"min-w-0",children:[h("div",{className:"flex min-w-0 items-center gap-1",children:[h(C,{variant:"ghost",size:"sm",className:"min-w-0 flex-1 justify-start gap-2","aria-label":`${z} · ${r(`subagents.${s.status}`)}`,"aria-expanded":u,"aria-controls":j,onClick:()=>{if(!u)k();c(!u)},children:[u?t(A,{className:"size-3.5 shrink-0"}):t(G,{className:"size-3.5 shrink-0"}),t("span",{className:"truncate",children:z}),t("span",{className:"text-muted-foreground ms-auto shrink-0 text-xs",role:"status",children:r(`subagents.${s.status}`)})]}),U&&t(C,{variant:"ghost",size:"icon-sm",disabled:x,"aria-label":r("subagents.cancel",{name:z}),onClick:()=>{V()},children:x?t(F,{className:"size-3.5 animate-spin"}):t(Z,{className:"size-3.5"})})]}),g&&!u&&t("p",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:g}),h("div",{id:j,hidden:!u,className:"min-w-0 ps-4",children:[(s.description||W)&&h("div",{className:"text-muted-foreground flex min-w-0 items-center gap-2 px-2 py-1 text-xs",children:[t("span",{className:"min-w-0 flex-1 truncate",title:s.description??void 0,children:s.description}),W&&t("span",{className:"shrink-0",children:Y(W)})]}),g&&h("div",{role:"alert",className:"text-destructive px-2 py-1 text-xs",children:[g," ",s.threadId&&t(C,{variant:"ghost",size:"sm",onClick:()=>{E(a===null?null:R)},children:r("timeline.retry")})]}),B&&t("p",{role:"status",className:"text-muted-foreground px-2 py-2 text-xs",children:r("timeline.loadingEarlier")}),R&&t(C,{variant:"ghost",size:"sm",disabled:B,onClick:()=>{E(R)},children:r("timeline.loadEarlier")}),o&&u&&(M&&M.items.length>0?t("div",{className:"flex max-h-72 min-h-0 flex-col",children:t(ns,{session:M})}):!B&&!g&&t("p",{className:"text-muted-foreground px-2 py-3 text-xs",children:r("subagents.noMessages")}))]})]})}function ns({session:s}){let{client:d,host:p}=e(),o=Zn(s);return t(ut,{session:s,client:d,host:p,turnWork:o})}
|
|
2
|
+
export{Zn,Zo};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d,i}from"./chunk-0f00j53n.js";import{q,K,de,W,Z,Se}from"./chunk-7egc2x4q.js";import{ke}from"./chunk-k1atcess.js";import{k}from"./chunk-qk1yqepm.js";import{we}from"./chunk-
|
|
1
|
+
import{d,i}from"./chunk-0f00j53n.js";import{q,K,de,W,Z,Se}from"./chunk-7egc2x4q.js";import{ke}from"./chunk-k1atcess.js";import{k}from"./chunk-qk1yqepm.js";import{we}from"./chunk-paxthe5v.js";import{Q,_e}from"./chunk-pqz2471h.js";import{CheckIcon as O,SparklesIcon as A,XIcon as U}from"lucide-react";import{useDeferredValue as V,useState as y}from"react";import{Button as N}from"@nyssance/shadcn/vega/components/ui/button";import{Dialog as F,DialogClose as X,DialogContent as _,DialogDescription as J,DialogHeader as R,DialogTitle as Y}from"@nyssance/shadcn/vega/components/ui/dialog";import{ItemTitle as ee}from"@nyssance/shadcn/vega/components/ui/item";import{Spinner as te}from"@nyssance/shadcn/vega/components/ui/spinner";import{Switch as ae}from"@nyssance/shadcn/vega/components/ui/switch";import{Tabs as se,TabsContent as ne,TabsList as le,TabsTrigger as ie}from"@nyssance/shadcn/vega/components/ui/tabs";import{jsx as t,jsxs as n,Fragment as S}from"react/jsx-runtime";function T({skill:r}){let{assetUrl:p}=d(),[u,s]=y(!1),l=r.interface?.iconSmall,h=l&&p?p(l):r.interface?.iconSmallUrl;return t("div",{className:"bg-muted flex size-10 shrink-0 items-center justify-center rounded-xl",children:h&&!u?t("img",{src:h,alt:"",onError:()=>s(!0),className:"size-6 rounded object-contain"}):t(A,{className:"text-muted-foreground size-6"})})}function oe({skill:r}){let{t:p}=d(),u=i((l)=>l.setSkillEnabled),s=i((l)=>(r.path in l.busySkills));return n("div",{className:"flex items-center gap-2",children:[s&&t(te,{className:"text-muted-foreground size-3.5"}),t(ae,{checked:r.enabled,disabled:s,"aria-label":`${p(r.enabled?"plugins.skills.disable":"plugins.skills.enable")}: ${r.interface?.displayName??r.name}`,onCheckedChange:(l)=>void u(r,l)})]})}function Yt({query:r,ready:p,onOpenPlugin:u}){let{t:s}=d(),l=i((e)=>e.skills),h=i((e)=>e.skillErrors),P=i((e)=>e.loading)||!p,j=i((e)=>e.installed),z=i((e)=>e.skillProjects),[M,E]=y(null),[v,L]=y(!1),[B,C]=y(null),b=V(r.trim().toLowerCase()),o=l.find((e)=>e.path===B),x=j.find(({plugin:e})=>e.id===o?.pluginId),c=l.filter((e)=>[e.name,e.interface?.displayName,e.description,e.shortDescription,e.interface?.shortDescription,e.pluginId].filter(Boolean).join(" ").toLowerCase().includes(b)).toSorted((e,a)=>(e.interface?.displayName??e.name).localeCompare(a.interface?.displayName??a.name)),m=[...["user","system","admin"].flatMap((e)=>{let a=l.filter((f)=>f.scope===e);return a.length?[{id:e,label:s(e==="user"?"plugins.catalog.personal":`plugins.skills.scope.${e}`),paths:new Set(a.map((f)=>f.path)),path:null}]:[]}),...Object.entries(z).flatMap(([e,a])=>{if(!l.some((I)=>I.scope==="repo"&&a.includes(I.path)))return[];let f=e.replace(/[\\/]+$/,"").split(/[\\/]/).at(-1)||e;return[{id:`project:${e}`,label:f,paths:new Set(a),path:e}]})],H=m.map((e)=>e.label);for(let e of m)if(e.path&&H.filter((a)=>a===e.label).length>1)e.label=e.path;let g=m.find((e)=>e.id===M)??m[0],D=g?c.filter((e)=>g.paths.has(e.path)):[],G=v||b?c:c.slice(0,6),w=(e)=>t(Z,{className:"grid grid-cols-1 gap-x-8 gap-y-2 px-0 @min-[700px]:grid-cols-2",children:e.map((a)=>n(Se,{className:"toolbox-row relative [contain-intrinsic-size:auto_80px] [content-visibility:auto]",children:[t(N,{variant:"ghost",className:"absolute inset-0 z-0 size-full","aria-label":a.interface?.displayName??a.name,onClick:()=>C(a.path)}),t(W,{className:"pointer-events-none relative translate-none! self-center!",children:t(T,{skill:a})}),n(K,{className:"pointer-events-none relative min-w-0",children:[t(ee,{className:"block truncate",children:a.interface?.displayName??a.name}),t(de,{className:"line-clamp-1",title:a.interface?.shortDescription??a.shortDescription??a.description,children:a.interface?.shortDescription??a.shortDescription??a.description})]}),t(q,{className:"text-muted-foreground pointer-events-none relative",children:a.enabled?t(O,{className:"size-4","aria-label":s("plugins.skills.enabledStatus")}):t("span",{className:"text-xs",children:s("plugins.skills.disabledBadge")})})]},a.path))});return n("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[t(k,{className:"pe-0",viewportClassName:"pe-0",children:n("div",{className:`${Q} space-y-8 pt-6`,children:[h.map((e)=>n("p",{role:"alert",className:"text-destructive text-xs break-words",children:[e.path,": ",e.message]},e.path)),P?t(ke,{skills:!0}):n(S,{children:[n("section",{"aria-label":s("plugins.skills.installed"),children:[n("div",{className:"mb-4 flex items-center justify-between gap-3",children:[t("h2",{className:"text-base font-medium",children:s("plugins.skills.installed")}),t("span",{role:"status",className:"text-muted-foreground text-xs",children:s("plugins.catalog.skillCount",{count:c.length})})]}),c.length?w(G):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s(b?"plugins.skills.filteredEmpty":"plugins.skills.empty")}),!b&&c.length>6&&t(N,{variant:"ghost",className:"text-muted-foreground mt-3 max-w-full justify-start","aria-expanded":v,onClick:()=>L((e)=>!e),children:v?s("plugins.sections.showLess"):s("plugins.catalog.showMore",{count:c.length-6})})]}),g&&n(se,{value:g.id,onValueChange:(e)=>{if(typeof e==="string")E(e)},className:"gap-6",children:[t(le,{"aria-label":s("plugins.catalog.scope"),className:"h-auto max-w-full flex-wrap justify-start gap-2 bg-transparent",children:m.map((e)=>t(ie,{value:e.id,title:e.path??e.label,className:"data-active:bg-muted! h-8 flex-none rounded-lg px-3 text-[13px] font-medium shadow-none! after:hidden dark:data-active:border-transparent",children:e.label},e.id))}),m.map((e)=>t(ne,{value:e.id,children:e.id===g.id&&(D.length?w(D):t("p",{className:"text-muted-foreground px-2 py-8 text-sm",children:s("plugins.skills.filteredEmpty")}))},e.id))]})]})]})}),t(F,{open:!!o,onOpenChange:(e)=>{if(!e)C(null)},children:t(_,{showCloseButton:!1,className:_e,children:o&&n(S,{children:[t(we,{path:o.path,renderHeader:(e)=>n(S,{children:[n("div",{className:"flex items-center justify-between gap-4",children:[t(T,{skill:o}),n("div",{className:"flex shrink-0 items-center gap-2",children:[t(oe,{skill:o}),e,t(X,{render:t(N,{variant:"ghost",size:"icon-sm","aria-label":s("plugins.close")}),children:t(U,{})})]})]}),n(R,{className:"gap-3",children:[t(Y,{className:"text-2xl leading-8 font-semibold break-words",children:o.interface?.displayName??o.name}),t(J,{className:"text-sm leading-6 break-words whitespace-pre-wrap",children:o.description})]})]})},o.path),o.pluginId&&n("div",{className:"text-sm",children:[n("span",{className:"text-muted-foreground",children:[s("plugins.catalog.fromPlugin")," "]}),x?t(N,{variant:"link",className:"h-auto p-0",onClick:()=>{C(null),u(x)},children:x.plugin.interface?.displayName??x.plugin.name}):o.pluginId]})]})})})]})}
|
|
2
2
|
export{Yt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as l,useSyncExternalStore as d}from"react";var at="chat.modelAliases",c={},r="gateway:alwith-managed-litellm:";function o(e){if(e===void 0)return c;if(typeof e!=="object"||e===null||Array.isArray(e)||Object.entries(e).some(([t,n])=>!t.startsWith(r)||t.length===r.length||typeof n!=="string"||!n.trim()||n.length>100))throw Error("Invalid model aliases");return e}function
|
|
2
|
-
export{at
|
|
1
|
+
import{useCallback as l,useSyncExternalStore as d}from"react";var at="chat.modelAliases",c={},r="gateway:alwith-managed-litellm:";function o(e){if(e===void 0)return c;if(typeof e!=="object"||e===null||Array.isArray(e)||Object.entries(e).some(([t,n])=>!t.startsWith(r)||t.length===r.length||typeof n!=="string"||!n.trim()||n.length>100))throw Error("Invalid model aliases");return e}function jt(e){let t=l((n)=>e.subscribe((s)=>{if(s.includes(at))n()}),[e]);return d(t,()=>o(e.get(at)))}async function qt(e,t,n){if(!t.startsWith(r)||t.length===r.length)throw Error("Invalid ALwith model ID");let s=await e.read(),i={...o(s.values[at])},a=n.trim();if(a)i[t]=a;else delete i[t];o(i),await e.write({action:"update",expectedRevision:s.revision,changes:{[at]:i}})}
|
|
2
|
+
export{at,jt,qt};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Wn}from"./chunk-vw6546pp.js";import{xe}from"./chunk-b0p2j2ab.js";import{cs}from"./chunk-6hxz5cpc.js";import{C,Ft}from"./chunk-x0m4ctqf.js";import{t}from"./chunk-7393tva2.js";import{ui,pi}from"./chunk-pqw5qz4e.js";import{D}from"./chunk-qbxdgkk9.js";import{ue}from"./chunk-wwywmqh8.js";import{isEmbeddedResource as g,isImage as x,isResourceLink as R,isText as h}from"@nyssance/codex-acp-v2/client";import{memo as v}from"react";import{jsx as i,jsxs as y}from"react/jsx-runtime";var di=v(function({item:n,messageTime:f,skillNames:u=[]}){let p=t(),r=pi(n._meta),m=r?r.map((e)=>e.question===void 0?e.text:`${e.question}
|
|
2
2
|
${e.text}`).join(`
|
|
3
|
-
`):ue(n),l=n.content.filter(x),d=new Set(Ft(m).map((e)=>e.id)),o=new Map,a=n.content.filter((e)=>{if(R(e)){let s=C(e.uri);if(s!==null){if(!d.has(s))o.set(s,{id:s,name:e.title??e.name});return!1}return!0}return g(e)}),c=r??n.content.filter(h).map((e)=>{let s=ui(e._meta);return s?{question:s.question,text:s.answer}:{text:e.text}});if(m.length===0&&l.length===0&&a.length===0&&o.size===0)return null;return y("div",{className:"group/codex-user flex min-w-0 flex-col items-end gap-2","data-content-search-unit-key":n.id,children:[a.length>0&&i("div",{className:"codex-user-mentions",children:a.map((e,s)=>i(D,{block:e},`${n.id}:${s}`))}),i(
|
|
3
|
+
`):ue(n),l=n.content.filter(x),d=new Set(Ft(m).map((e)=>e.id)),o=new Map,a=n.content.filter((e)=>{if(R(e)){let s=C(e.uri);if(s!==null){if(!d.has(s))o.set(s,{id:s,name:e.title??e.name});return!1}return!0}return g(e)}),c=r??n.content.filter(h).map((e)=>{let s=ui(e._meta);return s?{question:s.question,text:s.answer}:{text:e.text}});if(m.length===0&&l.length===0&&a.length===0&&o.size===0)return null;return y("div",{className:"group/codex-user flex min-w-0 flex-col items-end gap-2","data-content-search-unit-key":n.id,children:[a.length>0&&i("div",{className:"codex-user-mentions",children:a.map((e,s)=>i(D,{block:e},`${n.id}:${s}`))}),i(Wn,{value:{names:u,icon:p.skillIcon},children:i(cs,{host:p,message:n,text:m,textParts:c.some((e)=>("question"in e))?c:void 0,applicationReferences:o.size>0?i("div",{className:"mb-1.5 flex flex-wrap gap-1.5",children:[...o.values()].map((e)=>i(xe,{app:e},e.id))}):void 0,images:l,mentions:[],messageTime:f})})]})});
|
|
4
4
|
export{di};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{fromMcpServer as u}from"@agentclientprotocol/sdk/experimental/mcp-server";import{Server as g}from"@modelcontextprotocol/server";function
|
|
2
|
-
export{
|
|
1
|
+
import{fromMcpServer as u}from"@agentclientprotocol/sdk/experimental/mcp-server";import{Server as g}from"@modelcontextprotocol/server";function Bn(e){let{parse:o,execute:t,...s}=e;return{...s,execute:(n,i)=>t(o(n),i)}}var ko="alwith";function m(e){if(e.length>128)throw Error("Too many application tools");let o=new Map;for(let t of e){if(!/^[a-zA-Z][a-zA-Z0-9_]{0,49}$/.test(t.name)||o.has(t.name))throw Error(`Invalid or duplicate application tool: ${t.name}`);if(!t.description.trim()||t.inputSchema.type!=="object")throw Error(`Invalid application tool definition: ${t.name}`);o.set(t.name,{...t,inputSchema:structuredClone(t.inputSchema)})}return o}var p=(e)=>({content:[{type:"text",text:e instanceof Error?e.message:String(e)}],isError:!0});class So{servers=new Map;session;identity;constructor(e,o){this.session=e,this.identity=o}declare(e,o){let t={agent:e,tools:m(o),sessionId:null};return t.mcp=u(()=>this.server(t)),t.registration=e.registerMcpServer({name:ko,handler:t.mcp.handler}),this.servers.set(t.registration.serverId,t),t.registration.declaration}bind(e,o){let t=this.servers.get(e);if(!t)throw Error(`Application tool server is not registered: ${e}`);for(let[s,n]of this.servers)if(n.sessionId===o)this.dispose(s);t.sessionId=o}drop(e){for(let[o,t]of this.servers)if(t.sessionId===e)this.dispose(o)}clear(){for(let e of this.servers.keys())this.dispose(e)}dispose(e){let o=this.servers.get(e);if(!o)return;this.servers.delete(e),o.registration.dispose().then(()=>o.mcp.close())}server(e){let o=new g({name:ko,version:"1.0.0"},{capabilities:{tools:{}}});return o.setRequestHandler("tools/list",()=>({tools:[...e.tools.values()].map((t)=>({name:t.name,...t.title===void 0?{}:{title:t.title},description:t.description,inputSchema:structuredClone(t.inputSchema),...t.annotations===void 0?{}:{annotations:t.annotations}}))})),o.setRequestHandler("tools/call",async(t,s)=>{let n=e.tools.get(t.params.name);if(!n)return p(Error(`Application tool is not registered: ${t.params.name}`));let i=e.sessionId,l=i===null?void 0:this.session(i);if(i===null||!l?.attached||l.readOnly)return p(Error("Application tool session is not attached"));let{toolCallId:c,turnId:d}=this.identity(t.params._meta??{}),a=s.mcpReq.signal;try{let r=await n.execute(t.params.arguments??{},{sessionId:i,toolCallId:c,turnId:d,signal:a,agent:e.agent});return a.throwIfAborted(),r}catch(r){if(a.aborted)throw r;return p(r)}}),o}}
|
|
2
|
+
export{Bn,ko,So};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Qe,
|
|
1
|
+
import{Qe,on}from"./chunk-djppmswk.js";import{createStore as S}from"@alwith/api/client";import{createContext as y,useContext as h,useSyncExternalStore as x}from"react";import{jsx as w}from"react/jsx-runtime";function u(o){return typeof o==="object"&&o!==null&&!Array.isArray(o)}function Ri(o){if(o===null||o===void 0)return Qe();if(!u(o)||!u(o.collections)||!Array.isArray(o.order))throw Error("Saved collections are not in the expected format");let{collections:t,order:e}=o;for(let r of e)if(typeof r!=="string"||!u(t[r]))throw Error(`Saved collection missing: ${String(r)}`);return{collections:t,order:e,sessionMeta:{}}}function Os(o,{reportError:t=console.error}={}){let e=S(Qe()),r=async()=>{e.setState(Ri(await o.load()),!0)},i=r(),l=i.catch(t),C=()=>{let n=l.then(r);return i=n,l=n.catch(()=>{}),n},s=!1,a,c=o.subscribe?.(()=>{if(!s)C().catch(t)});if(typeof c==="function")a=c;else if(c!==void 0)c.then((n)=>{if(s)n();else a=n},t);return{store:e,getState:()=>e.getState(),ready:i,dispatch:(n)=>{let p=l.then(async()=>{await i;let d=(Array.isArray(n)?n:[n]).reduce(on,e.getState());await o.save({collections:d.collections,order:d.order}),e.setState(d,!0)});return l=p.catch(()=>{}),p},reload:C,dispose:()=>{s=!0,a?.()}}}var f=y(null);function Hs({store:o,children:t}){return w(f,{value:o,children:t})}function ao(){let o=h(f);if(o===null)throw Error("Collection store is missing; wrap the tree in CollectionProvider");return o}function Ie(o){let{store:t}=ao(),e=()=>o?o(t.getState()):t.getState();return x((r)=>t.subscribe(r),e,e)}function pe(){return ao().dispatch}
|
|
2
2
|
export{Ri,Os,Hs,ao,Ie,pe};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{F}from"./chunk-hz8yrg2t.js";import{t}from"./chunk-
|
|
1
|
+
import{F}from"./chunk-hz8yrg2t.js";import{t}from"./chunk-7393tva2.js";import{D}from"./chunk-qbxdgkk9.js";import{ContentBlock as i}from"@agentclientprotocol/sdk/experimental/v2/unstable";import{isEmbeddedResource as m,isResourceLink as u}from"@nyssance/codex-acp-v2/client";import{jsx as n}from"react/jsx-runtime";function d({block:e,streaming:o}){let r=t();if(i.isText(e)){if(e.text.length===0)return null;return n("div",{className:"codex-assistant-message",children:n(F,{text:e.text,streaming:o})})}if(i.isImage(e))return n(D,{block:e,generated:!0});if(i.isAudio(e))return n("audio",{controls:!0,src:`data:${e.mimeType};base64,${e.data}`});if(u(e)||m(e))return n(D,{block:e,generated:!0});return n("div",{className:"text-muted-foreground",children:r.t("timeline.unsupportedContent",{type:e.type})})}function Te({content:e,messageId:o,streaming:r}){return e.map((s,a)=>n(d,{block:s,streaming:r},`${o}:${a}`))}
|
|
2
2
|
export{Te};
|